WebKit Bugzilla
Attachment 372810 Details for
Bug 199178
: [ews-build] UploadTestResults and ExtractTestResults clobber results in case of multiple layout test runs in a build
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-199178-20190624195902.patch (text/plain), 6.26 KB, created by
Aakash Jain
on 2019-06-24 16:59:03 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Aakash Jain
Created:
2019-06-24 16:59:03 PDT
Size:
6.26 KB
patch
obsolete
>Index: Tools/ChangeLog >=================================================================== >--- Tools/ChangeLog (revision 246772) >+++ Tools/ChangeLog (working copy) >@@ -1,3 +1,15 @@ >+2019-06-24 Aakash Jain <aakash_jain@apple.com> >+ >+ [ews-build] UploadTestResults and ExtractTestResults clobber results in case of multiple layout test runs in a build >+ https://bugs.webkit.org/show_bug.cgi?id=199178 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * BuildSlaveSupport/ews-build/steps.py: >+ (UploadTestResults.__init__): Add an optional identifier and append the identifier to the file name. >+ (ExtractTestResults.__init__): Ditto. >+ * BuildSlaveSupport/ews-build/steps_unittest.py: Added unit tests. >+ > 2019-06-24 Michael Catanzaro <mcatanzaro@igalia.com> > > contributors.json not canonicalized since r243297 >Index: Tools/BuildSlaveSupport/ews-build/steps.py >=================================================================== >--- Tools/BuildSlaveSupport/ews-build/steps.py (revision 246769) >+++ Tools/BuildSlaveSupport/ews-build/steps.py (working copy) >@@ -1082,12 +1082,13 @@ class UploadTestResults(transfer.FileUpl > name = 'upload-test-results' > descriptionDone = ['Uploaded test results'] > workersrc = 'layout-test-results.zip' >- masterdest = Interpolate('public_html/results/%(prop:buildername)s/r%(prop:patch_id)s-%(prop:buildnumber)s.zip') > haltOnFailure = True > >- def __init__(self, **kwargs): >+ def __init__(self, identifier='', **kwargs): >+ if identifier and not identifier.startswith('-'): >+ identifier = '-{}'.format(identifier) > kwargs['workersrc'] = self.workersrc >- kwargs['masterdest'] = self.masterdest >+ kwargs['masterdest'] = Interpolate('public_html/results/%(prop:buildername)s/r%(prop:patch_id)s-%(prop:buildnumber)s{}.zip'.format(identifier)) > kwargs['mode'] = 0644 > kwargs['blocksize'] = 1024 * 256 > transfer.FileUpload.__init__(self, **kwargs) >@@ -1095,14 +1096,19 @@ class UploadTestResults(transfer.FileUpl > > class ExtractTestResults(master.MasterShellCommand): > name = 'extract-test-results' >- zipFile = Interpolate('public_html/results/%(prop:buildername)s/r%(prop:patch_id)s-%(prop:buildnumber)s.zip') >- resultDirectory = Interpolate('public_html/results/%(prop:buildername)s/r%(prop:patch_id)s-%(prop:buildnumber)s') >- > descriptionDone = ['Extracted test results'] >- command = ['unzip', zipFile, '-d', resultDirectory] > renderables = ['resultDirectory', 'zipFile'] >+ haltOnFailure = False >+ flunkOnFailure = False >+ >+ def __init__(self, identifier=''): >+ if identifier and not identifier.startswith('-'): >+ identifier = '-{}'.format(identifier) >+ >+ self.zipFile = Interpolate('public_html/results/%(prop:buildername)s/r%(prop:patch_id)s-%(prop:buildnumber)s{}.zip'.format(identifier)) >+ self.resultDirectory = Interpolate('public_html/results/%(prop:buildername)s/r%(prop:patch_id)s-%(prop:buildnumber)s{}'.format(identifier)) >+ self.command = ['unzip', self.zipFile, '-d', self.resultDirectory] > >- def __init__(self): > super(ExtractTestResults, self).__init__(self.command) > > def resultDirectoryURL(self): >Index: Tools/BuildSlaveSupport/ews-build/steps_unittest.py >=================================================================== >--- Tools/BuildSlaveSupport/ews-build/steps_unittest.py (revision 246769) >+++ Tools/BuildSlaveSupport/ews-build/steps_unittest.py (working copy) >@@ -1469,6 +1469,28 @@ class TestUploadTestResults(BuildStepMix > self.expectOutcome(result=SUCCESS, state_string='Uploaded test results') > return self.runStep() > >+ def test_success_with_identifier(self): >+ self.setupStep(UploadTestResults(identifier='clean-tree')) >+ self.setProperty('configuration', 'release') >+ self.setProperty('architecture', 'x86_64') >+ self.setProperty('patch_id', '271211') >+ self.setProperty('buildername', 'iOS-12-Simulator-WK2-Tests-EWS') >+ self.setProperty('buildnumber', '120') >+ self.expectHidden(False) >+ self.expectRemoteCommands( >+ Expect('uploadFile', dict( >+ workersrc='layout-test-results.zip', workdir='wkdir', >+ blocksize=1024 * 256, maxsize=None, keepstamp=False, >+ writer=ExpectRemoteRef(remotetransfer.FileWriter), >+ )) >+ + Expect.behavior(uploadFileWithContentsOfString('Dummy zip file content.')) >+ + 0, >+ ) >+ self.expectUploadedFile('public_html/results/iOS-12-Simulator-WK2-Tests-EWS/r271211-120-clean-tree.zip') >+ >+ self.expectOutcome(result=SUCCESS, state_string='Uploaded test results') >+ return self.runStep() >+ > > class TestExtractTestResults(BuildStepMixinAdditions, unittest.TestCase): > def setUp(self): >@@ -1496,6 +1518,24 @@ class TestExtractTestResults(BuildStepMi > self.expectAddedURLs([call('view layout test results', '/results/test/r2468_ab1a28b4feee0d42973c7c05335b35bca927e974 (1)/results.html')]) > return self.runStep() > >+ def test_success_with_identifier(self): >+ self.setupStep(ExtractTestResults(identifier='rerun')) >+ self.setProperty('configuration', 'release') >+ self.setProperty('patch_id', '1234') >+ self.setProperty('buildername', 'iOS-12-Simulator-WK2-Tests-EWS') >+ self.setProperty('buildnumber', '12') >+ self.expectLocalCommands( >+ ExpectMasterShellCommand(command=['unzip', >+ 'public_html/results/iOS-12-Simulator-WK2-Tests-EWS/r1234-12-rerun.zip', >+ '-d', >+ 'public_html/results/iOS-12-Simulator-WK2-Tests-EWS/r1234-12-rerun', >+ ]) >+ + 0, >+ ) >+ self.expectOutcome(result=SUCCESS, state_string='Extracted test results') >+ self.expectAddedURLs([call('view layout test results', '/results/test/r2468_ab1a28b4feee0d42973c7c05335b35bca927e974 (1)/results.html')]) >+ return self.runStep() >+ > def test_failure(self): > self.setupStep(ExtractTestResults()) > self.setProperty('configuration', 'debug')
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 199178
: 372810