Index: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/test.py |
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/test.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/test.py |
index b82e96ff89f8370332cabf0a02feab25cb2a7835..ba9e2ec5c9b49b18f7dd03628f53b3bac99d4644 100644 |
--- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/test.py |
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/test.py |
@@ -385,6 +385,23 @@ class TestPort(Port): |
'linux32': ['test-linux-x86', 'test-linux-precise', 'test-linux-trusty', 'test-win-win7'], |
} |
+ _mock_all_systems = (('mac10.10', 'x86'), |
+ ('mac10.11', 'x86'), |
+ ('win7', 'x86'), |
+ ('win10', 'x86'), |
+ ('linux32', 'x86'), |
+ ('precise', 'x86_64'), |
+ ('trusty', 'x86_64')) |
+ |
+ _mock_all_build_types = ('debug', 'release') |
+ |
+ """To avoid surprises when introducing new macros, these are intentionally fixed in time.""" |
+ _mock_configuration_specifier_macros = { |
+ 'mac': ['mac10.10', 'mac10.11'], |
+ 'win': ['win7', 'win10'], |
+ 'linux': ['linux32', 'precise', 'trusty'] |
+ } |
Dirk Pranke
2016/03/29 22:39:01
Nit: I would leave out the "_mock" part of these n
bokan
2016/04/05 12:28:56
Done.
|
+ |
@classmethod |
def determine_full_port_name(cls, host, options, port_name): |
if port_name == 'test': |
@@ -536,25 +553,23 @@ class TestPort(Port): |
build_type=build_type)) |
return test_configurations |
+ def set_all_systems(self, all_systems): |
+ self._mock_all_systems = all_systems |
+ |
def _all_systems(self): |
- return (('mac10.10', 'x86'), |
- ('mac10.11', 'x86'), |
- ('win7', 'x86'), |
- ('win10', 'x86'), |
- ('linux32', 'x86'), |
- ('precise', 'x86_64'), |
- ('trusty', 'x86_64')) |
+ return self._mock_all_systems |
Dirk Pranke
2016/03/29 22:39:01
Why not just make these things public instance var
bokan
2016/04/05 12:28:56
Done.
|
+ |
+ def set_all_build_types(self, all_build_types): |
+ self._mock_all_build_types = all_build_types |
def _all_build_types(self): |
- return ('debug', 'release') |
+ return self._mock_all_build_types |
+ |
+ def set_configuration_specifier_macros(self, macros): |
+ self._mock_configuration_specifier_macros = macros |
def configuration_specifier_macros(self): |
- """To avoid surprises when introducing new macros, these are intentionally fixed in time.""" |
- return { |
- 'mac': ['mac10.10', 'mac10.11'], |
- 'win': ['win7', 'win10'], |
- 'linux': ['linux32', 'precise', 'trusty'] |
- } |
+ return self._mock_configuration_specifier_macros |
def virtual_test_suites(self): |
return [ |