462class TestWebKitPyPython3Tests(BuildStepMixinAdditions, unittest.TestCase):
463 def setUp(self):
464 self.longMessage = True
465 self.jsonFileName = 'webkitpy_test_python3_results.json'
466 return self.setUpBuildStep()
467
468 def tearDown(self):
469 return self.tearDownBuildStep()
470
471 def test_success(self):
472 self.setupStep(RunWebKitPyPython3Tests())
473 self.expectRemoteCommands(
474 ExpectShell(workdir='wkdir',
475 logEnviron=False,
476 command=['python3', 'Tools/Scripts/test-webkitpy', '--json-output={0}'.format(self.jsonFileName)],
477 logfiles={'json': self.jsonFileName},
478 timeout=120,
479 )
480 + 0,
481 )
482 self.expectOutcome(result=SUCCESS, state_string='Passed webkitpy python3 tests')
483 return self.runStep()
484
485 def test_failure(self):
486 self.setupStep(RunWebKitPyPython3Tests())
487 self.expectRemoteCommands(
488 ExpectShell(workdir='wkdir',
489 logEnviron=False,
490 command=['python3', 'Tools/Scripts/test-webkitpy', '--json-output={0}'.format(self.jsonFileName)],
491 logfiles={'json': self.jsonFileName},
492 timeout=120,
493 )
494 + ExpectShell.log('stdio', stdout='''Ran 1744 tests in 5.913s
495FAILED (failures=1, errors=0)''')
496 + 2,
497 )
498 self.expectOutcome(result=FAILURE, state_string='webkitpy-tests (failure)')
499 return self.runStep()
500
501