Changeset 246793 in webkit
- Timestamp:
- Jun 25, 2019 9:17:43 AM (5 years ago)
- Location:
- trunk/Tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/BuildSlaveSupport/ews-build/steps.py
r246737 r246793 1083 1083 descriptionDone = ['Uploaded test results'] 1084 1084 workersrc = 'layout-test-results.zip' 1085 masterdest = Interpolate('public_html/results/%(prop:buildername)s/r%(prop:patch_id)s-%(prop:buildnumber)s.zip')1086 1085 haltOnFailure = True 1087 1086 1088 def __init__(self, **kwargs): 1087 def __init__(self, identifier='', **kwargs): 1088 if identifier and not identifier.startswith('-'): 1089 identifier = '-{}'.format(identifier) 1089 1090 kwargs['workersrc'] = self.workersrc 1090 kwargs['masterdest'] = self.masterdest1091 kwargs['masterdest'] = Interpolate('public_html/results/%(prop:buildername)s/r%(prop:patch_id)s-%(prop:buildnumber)s{}.zip'.format(identifier)) 1091 1092 kwargs['mode'] = 0644 1092 1093 kwargs['blocksize'] = 1024 * 256 … … 1096 1097 class ExtractTestResults(master.MasterShellCommand): 1097 1098 name = 'extract-test-results' 1098 zipFile = Interpolate('public_html/results/%(prop:buildername)s/r%(prop:patch_id)s-%(prop:buildnumber)s.zip')1099 resultDirectory = Interpolate('public_html/results/%(prop:buildername)s/r%(prop:patch_id)s-%(prop:buildnumber)s')1100 1101 1099 descriptionDone = ['Extracted test results'] 1102 command = ['unzip', zipFile, '-d', resultDirectory]1103 1100 renderables = ['resultDirectory', 'zipFile'] 1104 1105 def __init__(self): 1101 haltOnFailure = False 1102 flunkOnFailure = False 1103 1104 def __init__(self, identifier=''): 1105 if identifier and not identifier.startswith('-'): 1106 identifier = '-{}'.format(identifier) 1107 1108 self.zipFile = Interpolate('public_html/results/%(prop:buildername)s/r%(prop:patch_id)s-%(prop:buildnumber)s{}.zip'.format(identifier)) 1109 self.resultDirectory = Interpolate('public_html/results/%(prop:buildername)s/r%(prop:patch_id)s-%(prop:buildnumber)s{}'.format(identifier)) 1110 self.command = ['unzip', self.zipFile, '-d', self.resultDirectory] 1111 1106 1112 super(ExtractTestResults, self).__init__(self.command) 1107 1113 -
trunk/Tools/BuildSlaveSupport/ews-build/steps_unittest.py
r246737 r246793 1470 1470 return self.runStep() 1471 1471 1472 def test_success_with_identifier(self): 1473 self.setupStep(UploadTestResults(identifier='clean-tree')) 1474 self.setProperty('configuration', 'release') 1475 self.setProperty('architecture', 'x86_64') 1476 self.setProperty('patch_id', '271211') 1477 self.setProperty('buildername', 'iOS-12-Simulator-WK2-Tests-EWS') 1478 self.setProperty('buildnumber', '120') 1479 self.expectHidden(False) 1480 self.expectRemoteCommands( 1481 Expect('uploadFile', dict( 1482 workersrc='layout-test-results.zip', workdir='wkdir', 1483 blocksize=1024 * 256, maxsize=None, keepstamp=False, 1484 writer=ExpectRemoteRef(remotetransfer.FileWriter), 1485 )) 1486 + Expect.behavior(uploadFileWithContentsOfString('Dummy zip file content.')) 1487 + 0, 1488 ) 1489 self.expectUploadedFile('public_html/results/iOS-12-Simulator-WK2-Tests-EWS/r271211-120-clean-tree.zip') 1490 1491 self.expectOutcome(result=SUCCESS, state_string='Uploaded test results') 1492 return self.runStep() 1493 1472 1494 1473 1495 class TestExtractTestResults(BuildStepMixinAdditions, unittest.TestCase): … … 1490 1512 '-d', 1491 1513 'public_html/results/macOS-Sierra-Release-WK2-Tests-EWS/r1234-12', 1514 ]) 1515 + 0, 1516 ) 1517 self.expectOutcome(result=SUCCESS, state_string='Extracted test results') 1518 self.expectAddedURLs([call('view layout test results', '/results/test/r2468_ab1a28b4feee0d42973c7c05335b35bca927e974 (1)/results.html')]) 1519 return self.runStep() 1520 1521 def test_success_with_identifier(self): 1522 self.setupStep(ExtractTestResults(identifier='rerun')) 1523 self.setProperty('configuration', 'release') 1524 self.setProperty('patch_id', '1234') 1525 self.setProperty('buildername', 'iOS-12-Simulator-WK2-Tests-EWS') 1526 self.setProperty('buildnumber', '12') 1527 self.expectLocalCommands( 1528 ExpectMasterShellCommand(command=['unzip', 1529 'public_html/results/iOS-12-Simulator-WK2-Tests-EWS/r1234-12-rerun.zip', 1530 '-d', 1531 'public_html/results/iOS-12-Simulator-WK2-Tests-EWS/r1234-12-rerun', 1492 1532 ]) 1493 1533 + 0, -
trunk/Tools/ChangeLog
r246791 r246793 1 2019-06-25 Aakash Jain <aakash_jain@apple.com> 2 3 [ews-build] UploadTestResults and ExtractTestResults clobber results in case of multiple layout test runs in a build 4 https://bugs.webkit.org/show_bug.cgi?id=199178 5 6 Reviewed by Jonathan Bedard. 7 8 * BuildSlaveSupport/ews-build/steps.py: 9 (UploadTestResults.__init__): Add an optional identifier and append the identifier to the file name. 10 (ExtractTestResults.__init__): Ditto. 11 * BuildSlaveSupport/ews-build/steps_unittest.py: Added unit tests. 12 1 13 2019-06-25 Michael Catanzaro <mcatanzaro@igalia.com> 2 14
Note: See TracChangeset
for help on using the changeset viewer.