| Index: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_configuration_unittest.py
|
| diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_configuration_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_configuration_unittest.py
|
| index 39be8780b2da5168bee84c25c5b50f280d2881bf..d5c47ae96a72776b72e84f6307463c4e2e5ae113 100644
|
| --- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_configuration_unittest.py
|
| +++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_configuration_unittest.py
|
| @@ -34,7 +34,6 @@ from webkitpy.layout_tests.models.test_configuration import *
|
| def make_mock_all_test_configurations_set():
|
| all_test_configurations = set()
|
| for version, architecture in (('snowleopard', 'x86'),
|
| - ('xp', 'x86'),
|
| ('win7', 'x86'),
|
| ('vista', 'x86'),
|
| ('linux32', 'x86'),
|
| @@ -46,60 +45,60 @@ def make_mock_all_test_configurations_set():
|
|
|
| MOCK_MACROS = {
|
| 'mac': ['snowleopard'],
|
| - 'win': ['xp', 'vista', 'win7'],
|
| + 'win': ['vista', 'win7'],
|
| 'linux': ['linux32', 'precise', 'trusty'],
|
| }
|
|
|
|
|
| class TestConfigurationTest(unittest.TestCase):
|
| def test_items(self):
|
| - config = TestConfiguration('xp', 'x86', 'release')
|
| + config = TestConfiguration('win7', 'x86', 'release')
|
| result_config_dict = {}
|
| for category, specifier in config.items():
|
| result_config_dict[category] = specifier
|
| - self.assertEqual({'version': 'xp', 'architecture': 'x86', 'build_type': 'release'}, result_config_dict)
|
| + self.assertEqual({'version': 'win7', 'architecture': 'x86', 'build_type': 'release'}, result_config_dict)
|
|
|
| def test_keys(self):
|
| - config = TestConfiguration('xp', 'x86', 'release')
|
| + config = TestConfiguration('win7', 'x86', 'release')
|
| result_config_keys = []
|
| for category in config.keys():
|
| result_config_keys.append(category)
|
| self.assertEqual(set(['version', 'architecture', 'build_type']), set(result_config_keys))
|
|
|
| def test_str(self):
|
| - config = TestConfiguration('xp', 'x86', 'release')
|
| - self.assertEqual('<xp, x86, release>', str(config))
|
| + config = TestConfiguration('win7', 'x86', 'release')
|
| + self.assertEqual('<win7, x86, release>', str(config))
|
|
|
| def test_repr(self):
|
| - config = TestConfiguration('xp', 'x86', 'release')
|
| - self.assertEqual("TestConfig(version='xp', architecture='x86', build_type='release')", repr(config))
|
| + config = TestConfiguration('win7', 'x86', 'release')
|
| + self.assertEqual("TestConfig(version='win7', architecture='x86', build_type='release')", repr(config))
|
|
|
| def test_hash(self):
|
| config_dict = {}
|
| - config_dict[TestConfiguration('xp', 'x86', 'release')] = True
|
| - self.assertIn(TestConfiguration('xp', 'x86', 'release'), config_dict)
|
| - self.assertTrue(config_dict[TestConfiguration('xp', 'x86', 'release')])
|
| + config_dict[TestConfiguration('win7', 'x86', 'release')] = True
|
| + self.assertIn(TestConfiguration('win7', 'x86', 'release'), config_dict)
|
| + self.assertTrue(config_dict[TestConfiguration('win7', 'x86', 'release')])
|
|
|
| def query_unknown_key():
|
| - return config_dict[TestConfiguration('xp', 'x86', 'debug')]
|
| + return config_dict[TestConfiguration('win7', 'x86', 'debug')]
|
|
|
| self.assertRaises(KeyError, query_unknown_key)
|
| - self.assertIn(TestConfiguration('xp', 'x86', 'release'), config_dict)
|
| - self.assertNotIn(TestConfiguration('xp', 'x86', 'debug'), config_dict)
|
| - configs_list = [TestConfiguration('xp', 'x86', 'release'), TestConfiguration('xp', 'x86', 'debug'), TestConfiguration('xp', 'x86', 'debug')]
|
| + self.assertIn(TestConfiguration('win7', 'x86', 'release'), config_dict)
|
| + self.assertNotIn(TestConfiguration('win7', 'x86', 'debug'), config_dict)
|
| + configs_list = [TestConfiguration('win7', 'x86', 'release'), TestConfiguration('win7', 'x86', 'debug'), TestConfiguration('win7', 'x86', 'debug')]
|
| self.assertEqual(len(configs_list), 3)
|
| self.assertEqual(len(set(configs_list)), 2)
|
|
|
| def test_eq(self):
|
| - self.assertEqual(TestConfiguration('xp', 'x86', 'release'), TestConfiguration('xp', 'x86', 'release'))
|
| - self.assertNotEquals(TestConfiguration('xp', 'x86', 'release'), TestConfiguration('xp', 'x86', 'debug'))
|
| + self.assertEqual(TestConfiguration('win7', 'x86', 'release'), TestConfiguration('win7', 'x86', 'release'))
|
| + self.assertNotEquals(TestConfiguration('win7', 'x86', 'release'), TestConfiguration('win7', 'x86', 'debug'))
|
|
|
| def test_values(self):
|
| - config = TestConfiguration('xp', 'x86', 'release')
|
| + config = TestConfiguration('win7', 'x86', 'release')
|
| result_config_values = []
|
| for value in config.values():
|
| result_config_values.append(value)
|
| - self.assertEqual(set(['xp', 'x86', 'release']), set(result_config_values))
|
| + self.assertEqual(set(['win7', 'x86', 'release']), set(result_config_values))
|
|
|
|
|
| class SpecifierSorterTest(unittest.TestCase):
|
| @@ -111,7 +110,7 @@ class SpecifierSorterTest(unittest.TestCase):
|
| sorter = SpecifierSorter()
|
| self.assertIsNone(sorter.category_for_specifier('control'))
|
| sorter = SpecifierSorter(self._all_test_configurations)
|
| - self.assertEqual(sorter.category_for_specifier('xp'), 'version')
|
| + self.assertEqual(sorter.category_for_specifier('win7'), 'version')
|
| sorter = SpecifierSorter(self._all_test_configurations, MOCK_MACROS)
|
| self.assertEqual(sorter.category_for_specifier('mac'), 'version')
|
|
|
| @@ -169,24 +168,23 @@ class TestConfigurationConverterTest(unittest.TestCase):
|
|
|
| self.assertEqual(converter.to_config_set(set(['foo'])), set())
|
|
|
| - self.assertEqual(converter.to_config_set(set(['xp', 'foo'])), set())
|
| + self.assertEqual(converter.to_config_set(set(['win7', 'foo'])), set())
|
|
|
| errors = []
|
| - self.assertEqual(converter.to_config_set(set(['xp', 'foo']), errors), set())
|
| + self.assertEqual(converter.to_config_set(set(['win7', 'foo']), errors), set())
|
| self.assertEqual(errors, ["Unrecognized specifier 'foo'"])
|
|
|
| - self.assertEqual(converter.to_config_set(set(['xp', 'x86_64'])), set())
|
| + self.assertEqual(converter.to_config_set(set(['win7', 'x86_64'])), set())
|
|
|
| configs_to_match = set([
|
| - TestConfiguration('xp', 'x86', 'release'),
|
| + TestConfiguration('win7', 'x86', 'release'),
|
| ])
|
| - self.assertEqual(converter.to_config_set(set(['xp', 'release'])), configs_to_match)
|
| + self.assertEqual(converter.to_config_set(set(['win7', 'release'])), configs_to_match)
|
|
|
| configs_to_match = set([
|
| TestConfiguration('snowleopard', 'x86', 'release'),
|
| TestConfiguration('vista', 'x86', 'release'),
|
| TestConfiguration('win7', 'x86', 'release'),
|
| - TestConfiguration('xp', 'x86', 'release'),
|
| TestConfiguration('linux32', 'x86', 'release'),
|
| TestConfiguration('precise', 'x86_64', 'release'),
|
| TestConfiguration('trusty', 'x86_64', 'release'),
|
| @@ -234,14 +232,12 @@ class TestConfigurationConverterTest(unittest.TestCase):
|
| converter = TestConfigurationConverter(self._all_test_configurations, MOCK_MACROS)
|
|
|
| configs_to_match = set([
|
| - TestConfiguration('xp', 'x86', 'release'),
|
| TestConfiguration('vista', 'x86', 'release'),
|
| TestConfiguration('win7', 'x86', 'release'),
|
| ])
|
| self.assertEqual(converter.to_config_set(set(['win', 'release'])), configs_to_match)
|
|
|
| configs_to_match = set([
|
| - TestConfiguration('xp', 'x86', 'release'),
|
| TestConfiguration('vista', 'x86', 'release'),
|
| TestConfiguration('win7', 'x86', 'release'),
|
| TestConfiguration('linux32', 'x86', 'release'),
|
| @@ -251,7 +247,6 @@ class TestConfigurationConverterTest(unittest.TestCase):
|
| configs_to_match)
|
|
|
| configs_to_match = set([
|
| - TestConfiguration('xp', 'x86', 'release'),
|
| TestConfiguration('vista', 'x86', 'release'),
|
| TestConfiguration('win7', 'x86', 'release'),
|
| TestConfiguration('snowleopard', 'x86', 'release'),
|
| @@ -265,28 +260,28 @@ class TestConfigurationConverterTest(unittest.TestCase):
|
| self.assertEqual(converter.to_specifiers_list(set()), [])
|
|
|
| configs_to_match = set([
|
| - TestConfiguration('xp', 'x86', 'release'),
|
| + TestConfiguration('win7', 'x86', 'release'),
|
| ])
|
| - self.assertEqual(converter.to_specifiers_list(configs_to_match), [set(['release', 'xp'])])
|
| + self.assertEqual(converter.to_specifiers_list(configs_to_match), [set(['release', 'win7'])])
|
|
|
| configs_to_match = set([
|
| - TestConfiguration('xp', 'x86', 'release'),
|
| - TestConfiguration('xp', 'x86', 'debug'),
|
| + TestConfiguration('win7', 'x86', 'release'),
|
| + TestConfiguration('win7', 'x86', 'debug'),
|
| ])
|
| - self.assertEqual(converter.to_specifiers_list(configs_to_match), [set(['xp'])])
|
| + self.assertEqual(converter.to_specifiers_list(configs_to_match), [set(['win7'])])
|
|
|
| configs_to_match = set([
|
| TestConfiguration('linux32', 'x86', 'debug'),
|
| TestConfiguration('precise', 'x86_64', 'debug'),
|
| TestConfiguration('trusty', 'x86_64', 'debug'),
|
| - TestConfiguration('xp', 'x86', 'release'),
|
| + TestConfiguration('win7', 'x86', 'release'),
|
| ])
|
| self.assertEqual(converter.to_specifiers_list(configs_to_match),
|
| - [set(['release', 'xp']), set(['debug', 'linux'])])
|
| + [set(['release', 'win7']), set(['debug', 'linux'])])
|
|
|
| configs_to_match = set([
|
| - TestConfiguration('xp', 'x86', 'release'),
|
| - TestConfiguration('xp', 'x86', 'release'),
|
| + TestConfiguration('win7', 'x86', 'release'),
|
| + TestConfiguration('win7', 'x86', 'release'),
|
| TestConfiguration('trusty', 'x86_64', 'debug'),
|
| TestConfiguration('precise', 'x86_64', 'debug'),
|
| TestConfiguration('linux32', 'x86', 'debug'),
|
| @@ -295,13 +290,12 @@ class TestConfigurationConverterTest(unittest.TestCase):
|
| TestConfiguration('linux32', 'x86', 'debug'),
|
| ])
|
| self.assertEqual(converter.to_specifiers_list(configs_to_match),
|
| - [set(['release', 'xp']), set(['debug', 'linux'])])
|
| + [set(['release', 'win7']), set(['debug', 'linux'])])
|
|
|
| configs_to_match = set([
|
| - TestConfiguration('xp', 'x86', 'release'),
|
| + TestConfiguration('win7', 'x86', 'release'),
|
| TestConfiguration('snowleopard', 'x86', 'release'),
|
| TestConfiguration('vista', 'x86', 'release'),
|
| - TestConfiguration('win7', 'x86', 'release'),
|
| TestConfiguration('linux32', 'x86', 'release'),
|
| TestConfiguration('precise', 'x86_64', 'release'),
|
| TestConfiguration('trusty', 'x86_64', 'release'),
|
| @@ -309,20 +303,19 @@ class TestConfigurationConverterTest(unittest.TestCase):
|
| self.assertEqual(converter.to_specifiers_list(configs_to_match), [set(['release'])])
|
|
|
| configs_to_match = set([
|
| - TestConfiguration('xp', 'x86', 'release'),
|
| + TestConfiguration('win7', 'x86', 'release'),
|
| TestConfiguration('snowleopard', 'x86', 'release'),
|
| ])
|
| - self.assertEqual(converter.to_specifiers_list(configs_to_match), [set(['xp', 'mac', 'release'])])
|
| + self.assertEqual(converter.to_specifiers_list(configs_to_match), [set(['win7', 'mac', 'release'])])
|
|
|
| configs_to_match = set([
|
| - TestConfiguration('xp', 'x86', 'release'),
|
| TestConfiguration('snowleopard', 'x86', 'release'),
|
| TestConfiguration('win7', 'x86', 'release'),
|
| TestConfiguration('win7', 'x86', 'debug'),
|
| TestConfiguration('trusty', 'x86_64', 'release'),
|
| ])
|
| self.assertEqual(converter.to_specifiers_list(configs_to_match),
|
| - [set(['win7']), set(['release', 'xp', 'mac', 'trusty'])])
|
| + [set(['win7']), set(['release', 'mac', 'trusty'])])
|
|
|
| def test_macro_collapsing(self):
|
| macros = {'foo': ['bar', 'baz'], 'people': ['bob', 'alice', 'john']}
|
| @@ -347,14 +340,12 @@ class TestConfigurationConverterTest(unittest.TestCase):
|
| converter = TestConfigurationConverter(self._all_test_configurations, MOCK_MACROS)
|
|
|
| configs_to_match = set([
|
| - TestConfiguration('xp', 'x86', 'release'),
|
| TestConfiguration('vista', 'x86', 'release'),
|
| TestConfiguration('win7', 'x86', 'release'),
|
| ])
|
| self.assertEqual(converter.to_specifiers_list(configs_to_match), [set(['win', 'release'])])
|
|
|
| configs_to_match = set([
|
| - TestConfiguration('xp', 'x86', 'release'),
|
| TestConfiguration('vista', 'x86', 'release'),
|
| TestConfiguration('win7', 'x86', 'release'),
|
| TestConfiguration('linux32', 'x86', 'release'),
|
| @@ -364,7 +355,6 @@ class TestConfigurationConverterTest(unittest.TestCase):
|
| self.assertEqual(converter.to_specifiers_list(configs_to_match), [set(['win', 'linux', 'release'])])
|
|
|
| configs_to_match = set([
|
| - TestConfiguration('xp', 'x86', 'release'),
|
| TestConfiguration('vista', 'x86', 'release'),
|
| TestConfiguration('win7', 'x86', 'release'),
|
| TestConfiguration('snowleopard', 'x86', 'release'),
|
| @@ -372,7 +362,6 @@ class TestConfigurationConverterTest(unittest.TestCase):
|
| self.assertEqual(converter.to_specifiers_list(configs_to_match), [set(['win', 'mac', 'release'])])
|
|
|
| configs_to_match = set([
|
| - TestConfiguration('xp', 'x86', 'release'),
|
| TestConfiguration('vista', 'x86', 'release'),
|
| TestConfiguration('win7', 'x86', 'release'),
|
| TestConfiguration('snowleopard', 'x86', 'release'),
|
| @@ -380,7 +369,6 @@ class TestConfigurationConverterTest(unittest.TestCase):
|
| self.assertEqual(converter.to_specifiers_list(configs_to_match), [set(['win', 'mac', 'release'])])
|
|
|
| configs_to_match = set([
|
| - TestConfiguration('xp', 'x86', 'release'),
|
| TestConfiguration('vista', 'x86', 'release'),
|
| TestConfiguration('win7', 'x86', 'release'),
|
| ])
|
|
|