Bug 1302028 - part 3 - modify path for filtering out servo tasks; r=gps
authorNathan Froyd <froydnj@mozilla.com>
Fri, 20 Jan 2017 11:33:04 -0500
changeset 375369 84cf4267a0069682cd70df5091221f820617bcda
parent 375368 210b8d21be0634b4f5b01b9413b2207311e763bb
child 375370 dd2b221b990be587001ae37c04a1b2fb741b488b
push id6996
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 20:48:21 +0000
treeherdermozilla-beta@d89512dab048 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs1302028
milestone53.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1302028 - part 3 - modify path for filtering out servo tasks; r=gps We're adding a dummy servo/ports/geckoservo/ directory, which would make the filtering logic for Taskcluster tasks think that we want to run Servo tasks all the time. But we don't have a complete installation of Servo, so things will inevitably fall over if we did that. To avoid this situation, change the path that the filter checks for to something a little more specific and less likely to cause conflicts.
taskcluster/taskgraph/filter_tasks.py
taskcluster/taskgraph/test/test_filters.py
--- a/taskcluster/taskgraph/filter_tasks.py
+++ b/taskcluster/taskgraph/filter_tasks.py
@@ -36,17 +36,17 @@ def filter_target_tasks(graph, parameter
     attr = parameters.get('target_tasks_method', 'all_tasks')
     fn = target_tasks.get_method(attr)
     return fn(graph, parameters)
 
 
 @filter_task('check_servo')
 def filter_servo(graph, parameters):
     """Filters out tasks requiring Servo if Servo isn't present."""
-    if os.path.exists(os.path.join(GECKO, 'servo')):
+    if os.path.exists(os.path.join(GECKO, 'servo', 'components', 'style')):
         return graph.tasks.keys()
 
     logger.info('servo/ directory not present; removing tasks requiring it')
 
     SERVO_PLATFORMS = {
         'linux64-stylo',
     }
 
--- a/taskcluster/taskgraph/test/test_filters.py
+++ b/taskcluster/taskgraph/test/test_filters.py
@@ -38,16 +38,16 @@ class TestServoFilter(unittest.TestCase)
             'b': TestTask(kind='build', label='b',
                           attributes={'build_platform': 'linux64-stylo'}),
             'c': TestTask(kind='desktop-test', label='c', attributes={}),
         }, graph=Graph(nodes={'a', 'b', 'c'}, edges=set()))
 
         # Missing servo/ directory should prune tasks requiring Servo.
         self.assertEqual(set(filter_tasks.filter_servo(graph, {})), {'a', 'c'})
 
-        # Servo tasks should be retained if servo/ present.
-        os.mkdir(os.path.join(self._tmpdir, 'servo'))
+        # Servo tasks should be retained if servo/components/style/ present.
+        os.makedirs(os.path.join(self._tmpdir, 'servo', 'components', 'style'))
         self.assertEqual(set(filter_tasks.filter_servo(graph, {})),
                          {'a', 'b', 'c'})
 
 
 if __name__ == '__main__':
     main()