From de39e4a3028c744da4a697014d62612824c3b254 Mon Sep 17 00:00:00 2001 From: Gregory Szorc Date: Fri, 3 Feb 2017 16:23:14 -0800 Subject: [PATCH] Bug 1336607 - Remove dummy geckolib and taskgraph filter; r=froydnj MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Now that we use the real geckolib and have all dependencies vendored, the dummy geckolib is no longer required, so we remove it. Also, the taskgraph code for testing for Servo's presence always passes and is no longer needed, so we remove it. Pushed on a CLOSED TREE because ¯\_(ツ)_/¯ MozReview-Commit-ID: ITAqArK4Bks --HG-- extra : rebase_source : 5eedb3994b679109246b89b0456dd2a59ef3212b extra : amend_source : b0c97486ae2b72fd21c7968849735e4189e2e86f --- taskcluster/taskgraph/decision.py | 1 - taskcluster/taskgraph/filter_tasks.py | 26 --------- taskcluster/taskgraph/test/test_filters.py | 62 ---------------------- toolkit/library/geckolib/Cargo.toml | 12 ----- toolkit/library/geckolib/lib.rs | 5 -- 5 files changed, 106 deletions(-) delete mode 100644 taskcluster/taskgraph/test/test_filters.py delete mode 100644 toolkit/library/geckolib/Cargo.toml delete mode 100644 toolkit/library/geckolib/lib.rs diff --git a/taskcluster/taskgraph/decision.py b/taskcluster/taskgraph/decision.py index 497f7e8a8150..b33dcaec7a58 100644 --- a/taskcluster/taskgraph/decision.py +++ b/taskcluster/taskgraph/decision.py @@ -134,7 +134,6 @@ def get_decision_parameters(options): # Define default filter list, as most configurations shouldn't need # custom filters. parameters['filters'] = [ - 'check_servo', 'target_tasks_method', ] diff --git a/taskcluster/taskgraph/filter_tasks.py b/taskcluster/taskgraph/filter_tasks.py index ef2c8a51a105..c08d2d93c6fd 100644 --- a/taskcluster/taskgraph/filter_tasks.py +++ b/taskcluster/taskgraph/filter_tasks.py @@ -37,29 +37,3 @@ def filter_target_tasks(graph, parameters): 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.""" - # This filter is temporary until Servo's dependencies are vendored. - cargo = os.path.join(GECKO, 'toolkit', 'library', 'rust', 'shared', - 'Cargo.toml') - with open(cargo, 'rb') as fh: - cargo = fh.read() - - if b'servo/ports/geckolib' in cargo: - return graph.tasks.keys() - - logger.info('real servo geckolib not used; removing tasks requiring it') - - SERVO_PLATFORMS = { - 'linux64-stylo', - } - - def fltr(task): - if task.attributes.get('build_platform') in SERVO_PLATFORMS: - return False - - return True - - return [l for l, t in graph.tasks.iteritems() if fltr(t)] diff --git a/taskcluster/taskgraph/test/test_filters.py b/taskcluster/taskgraph/test/test_filters.py deleted file mode 100644 index 35ff2774276f..000000000000 --- a/taskcluster/taskgraph/test/test_filters.py +++ /dev/null @@ -1,62 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. - -from __future__ import absolute_import, unicode_literals - -import os -import shutil -import tempfile -import unittest - -from mozunit import main - -from .. import filter_tasks -from ..graph import ( - Graph, -) -from ..taskgraph import ( - TaskGraph, -) -from .util import ( - TestTask, -) - - -class TestServoFilter(unittest.TestCase): - def setUp(self): - self._tmpdir = tempfile.mkdtemp() - filter_tasks.GECKO = self._tmpdir - - def tearDown(self): - shutil.rmtree(self._tmpdir) - - def test_basic(self): - graph = TaskGraph(tasks={ - 'a': TestTask(kind='build', label='a', - attributes={'build_platform': 'linux64'}), - '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())) - - shared = os.path.join(self._tmpdir, 'toolkit', 'library', 'rust', 'shared') - cargo = os.path.join(shared, 'Cargo.toml') - os.makedirs(shared) - with open(cargo, 'a'): - pass - - # Default Cargo.toml should result in Servo tasks being pruned. - self.assertEqual(set(filter_tasks.filter_servo(graph, {})), {'a', 'c'}) - - # Servo tasks should be retained if real geckolib is present. - with open(cargo, 'wb') as fh: - fh.write(b'[dependencies]\n') - fh.write(b'geckoservo = { path = "../../../../servo/ports/geckolib" }\n') - - self.assertEqual(set(filter_tasks.filter_servo(graph, {})), - {'a', 'b', 'c'}) - - -if __name__ == '__main__': - main() diff --git a/toolkit/library/geckolib/Cargo.toml b/toolkit/library/geckolib/Cargo.toml deleted file mode 100644 index 328c8bbb134f..000000000000 --- a/toolkit/library/geckolib/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "geckoservo" -version = "0.0.0" -authors = ["nobody@mozilla.org"] -license = "MPL-2.0" -description = "Dummy geckoservo package for build-time bindgen to land turned off" - -[features] -bindgen = [] - -[lib] -path = "lib.rs" diff --git a/toolkit/library/geckolib/lib.rs b/toolkit/library/geckolib/lib.rs deleted file mode 100644 index b0b58253af44..000000000000 --- a/toolkit/library/geckolib/lib.rs +++ /dev/null @@ -1,5 +0,0 @@ -// This Source Code Form is subject to the terms of the Mozilla Public -// License, v. 2.0. If a copy of the MPL was not distributed with this -// file, You can obtain one at http://mozilla.org/MPL/2.0/. - -// Empty file. You should not need to add anything here.