diff --git a/run/src/master/master.cfg b/run/src/master/master.cfg index 58090f08d..e6a3adf90 100644 --- a/run/src/master/master.cfg +++ b/run/src/master/master.cfg @@ -144,13 +144,19 @@ trigger_factory = util.BuildFactory( chunked_steps ) -chunk_result_dir_name = util.Interpolate('/'.join([ - '..', 'chunk-results', '%(prop:revision)s', '%(prop:browser_name)s' -])) -chunk_result_file_name = util.Interpolate('/'.join([ - '..', 'chunk-results', '%(prop:revision)s', '%(prop:browser_name)s', +# It is possible that no commits are merged to the `master` branch of the Web +# Platform tests project between two regularly-scheduled occurrences of the +# "Initiator" builder. In order to prevent collision of temporary data storage +# locations in these cases, special care should be taken to ensure that +# distinct "chunk results" directory names are used. This is accomplished below +# by including the identifier of the "Initiator" build. +chunk_result_dir_name = util.Interpolate( + '../chunk-results/%(prop:results_id)s' +) +chunk_result_file_name = util.Interpolate( + '../chunk-results/%(prop:results_id)s/' + '%(prop:this_chunk)s_of_%(prop:total_chunks)s.json' -])) +) chunked_factory = util.BuildFactory([ steps.Git(repourl='git://github.com/w3c/web-platform-tests'), temp_dir.CreateStep(name='Create temporary directory'), @@ -195,7 +201,8 @@ chunked_factory = util.BuildFactory([ 'browser_version': util.Property('browser_version'), 'os_name': util.Property('os_name'), 'os_version': util.Property('os_version'), - 'revision_date': util.Property('revision_date') + 'revision_date': util.Property('revision_date'), + 'results_id': util.Property('results_id') }) ]) diff --git a/run/src/master/wpt_chunked_step.py b/run/src/master/wpt_chunked_step.py index 7c1e78a4f..026fb4960 100644 --- a/run/src/master/wpt_chunked_step.py +++ b/run/src/master/wpt_chunked_step.py @@ -19,7 +19,10 @@ def __init__(self, platform_id, platform, total_chunks, *args, **kwargs): def getSchedulersAndProperties(self): spec = [] + revision = self.build.properties.getProperty('got_revision') revision_date = self.build.properties.getProperty('revision_date') + browser_name = self.platform['browser_name'] + results_id = '%s-%s-%s' % (browser_name, revision, self.build.buildid) for scheduler in self.schedulerNames: unimportant = scheduler in self.unimportantSchedulerNames @@ -31,12 +34,13 @@ def getSchedulersAndProperties(self): 'this_chunk': this_chunk, 'total_chunks': self.total_chunks, 'platform_id': self.platform_id, - 'browser_name': self.platform['browser_name'], + 'browser_name': browser_name, 'browser_version': self.platform['browser_version'], 'os_name': self.platform['os_name'], 'os_version': self.platform['os_version'], 'use_sauce_labs': self.platform.get('sauce', False), - 'revision_date': revision_date + 'revision_date': revision_date, + 'results_id': results_id }, 'unimportant': unimportant }) diff --git a/run/src/master/wpt_detect_complete_step.py b/run/src/master/wpt_detect_complete_step.py index b0dccf323..fb7643f34 100644 --- a/run/src/master/wpt_detect_complete_step.py +++ b/run/src/master/wpt_detect_complete_step.py @@ -15,15 +15,12 @@ def __init__(self, *args, **kwargs): super(WptDetectCompleteStep, self).__init__(*args, **kwargs) def allResultsPresent(self, step): - browser_name = self.build.properties.getProperty('browser_name') - revision = self.build.properties.getProperty('revision') total_chunks = self.build.properties.getProperty('total_chunks') chunk_results_dir = os.path.sep.join([ os.path.abspath(os.path.dirname(__file__)), '..', 'chunk-results', - revision, - browser_name + self.build.properties.getProperty('results_id') ]) actual = set(os.listdir(chunk_results_dir)) expected = set(