OLD | NEW |
1 # Copyright (C) 2011 Google Inc. All rights reserved. | 1 # Copyright (C) 2011 Google Inc. All rights reserved. |
2 # | 2 # |
3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
5 # met: | 5 # met: |
6 # | 6 # |
7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
10 # copyright notice, this list of conditions and the following disclaimer | 10 # copyright notice, this list of conditions and the following disclaimer |
(...skipping 23 matching lines...) Expand all Loading... |
34 # In this dictionary, each item stores: | 34 # In this dictionary, each item stores: |
35 # * port_name -- a fully qualified port name | 35 # * port_name -- a fully qualified port name |
36 # * rebaseline_override_dir -- (optional) directory to put baselines in instead
of where you would normally put them. | 36 # * rebaseline_override_dir -- (optional) directory to put baselines in instead
of where you would normally put them. |
37 # This is useful when we don't have bots that cover particular configuratio
ns; so, e.g., you might | 37 # This is useful when we don't have bots that cover particular configuratio
ns; so, e.g., you might |
38 # support mac-mountainlion but not have a mac-mountainlion bot yet, so you'
d want to put the mac-lion | 38 # support mac-mountainlion but not have a mac-mountainlion bot yet, so you'
d want to put the mac-lion |
39 # results into platform/mac temporarily. | 39 # results into platform/mac temporarily. |
40 # * specifiers -- TestExpectation specifiers for that config. Valid values are f
ound in | 40 # * specifiers -- TestExpectation specifiers for that config. Valid values are f
ound in |
41 # TestExpectationsParser._configuration_tokens_list | 41 # TestExpectationsParser._configuration_tokens_list |
42 | 42 |
43 _exact_matches = { | 43 _exact_matches = { |
44 "WebKit XP": {"port_name": "win-xp", "specifiers": ['XP', 'Release']}, | 44 'WebKit XP': {'port_name': 'win-xp', 'specifiers': ['XP', 'Release']}, |
45 "WebKit Win7": {"port_name": "win-win7", "specifiers": ['Win7', 'Release']}, | 45 'WebKit Win7': {'port_name': 'win-win7', 'specifiers': ['Win7', 'Release']}, |
46 "WebKit Win7 (dbg)": {"port_name": "win-win7", "specifiers": ['Win7', 'Debug
']}, | 46 'WebKit Win7 (dbg)': {'port_name': 'win-win7', 'specifiers': ['Win7', 'Debug
']}, |
47 "WebKit Linux": {"port_name": "linux-x86_64", "specifiers": ['Linux', 'Relea
se']}, | 47 'WebKit Linux': {'port_name': 'linux-x86_64', 'specifiers': ['Linux', 'Relea
se']}, |
48 "WebKit Linux 32": {"port_name": "linux-x86", "specifiers": ['Linux', 'Relea
se']}, | 48 'WebKit Linux 32': {'port_name': 'linux-x86', 'specifiers': ['Linux', 'Relea
se']}, |
49 "WebKit Linux (dbg)": {"port_name": "linux-x86_64", "specifiers": ['Linux',
'Debug']}, | 49 'WebKit Linux (dbg)': {'port_name': 'linux-x86_64', 'specifiers': ['Linux',
'Debug']}, |
50 "WebKit Mac10.6": {"port_name": "mac-snowleopard", "specifiers": ['SnowLeopa
rd', 'Release']}, | 50 'WebKit Mac10.6': {'port_name': 'mac-snowleopard', 'specifiers': ['SnowLeopa
rd', 'Release']}, |
51 "WebKit Mac10.6 (dbg)": {"port_name": "mac-snowleopard", "specifiers": ['Sno
wLeopard', 'Debug']}, | 51 'WebKit Mac10.6 (dbg)': {'port_name': 'mac-snowleopard', 'specifiers': ['Sno
wLeopard', 'Debug']}, |
52 "WebKit Mac10.7": {"port_name": "mac-lion", "specifiers": ['Lion', 'Release'
]}, | 52 'WebKit Mac10.7': {'port_name': 'mac-lion', 'specifiers': ['Lion', 'Release'
]}, |
53 "WebKit Mac10.7 (dbg)": {"port_name": "mac-lion", "specifiers": ['Lion', 'De
bug']}, | 53 'WebKit Mac10.7 (dbg)': {'port_name': 'mac-lion', 'specifiers': ['Lion', 'De
bug']}, |
54 "WebKit Mac10.8": {"port_name": "mac-mountainlion", "specifiers": ['Mountain
Lion', 'Release']}, | 54 'WebKit Mac10.8': {'port_name': 'mac-mountainlion', 'specifiers': ['Mountain
Lion', 'Release']}, |
55 "WebKit Mac10.8 (retina)": {"port_name": "mac-retina", "specifiers": ['Retin
a', 'Release']}, | 55 'WebKit Mac10.8 (retina)': {'port_name': 'mac-retina', 'specifiers': ['Retin
a', 'Release']}, |
56 "WebKit Mac10.9": {"port_name": "mac-mavericks", "specifiers": ['Mavericks',
'Release']}, | 56 'WebKit Mac10.9': {'port_name': 'mac-mavericks', 'specifiers': ['Mavericks',
'Release']}, |
57 "WebKit Android (Nexus4)": {"port_name": "android", "specifiers": ['Android'
, 'Release']}, | 57 'WebKit Android (Nexus4)': {'port_name': 'android', 'specifiers': ['Android'
, 'Release']}, |
58 } | 58 } |
59 | 59 |
60 | 60 |
61 # Mapping from port name to the deps builder of the same os: | 61 # Mapping from port name to the deps builder of the same os: |
62 _deps_builders = { | 62 _deps_builders = { |
63 "linux-x86": "WebKit Linux (deps)", | 63 'linux-x86': 'WebKit Linux (deps)', |
64 "linux-x86_64": "WebKit Linux (deps)", | 64 'linux-x86_64': 'WebKit Linux (deps)', |
65 "win-xp": "WebKit XP (deps)", | 65 'win-xp': 'WebKit XP (deps)', |
66 "win-win7": "WebKit XP (deps)", | 66 'win-win7': 'WebKit XP (deps)', |
67 "mac-snowleopard": "WebKit Mac10.6 (deps)", | 67 'mac-snowleopard': 'WebKit Mac10.6 (deps)', |
68 "mac-lion": "WebKit Mac10.6 (deps)", | 68 'mac-lion': 'WebKit Mac10.6 (deps)', |
69 "mac-mountainlion": "WebKit Mac10.6 (deps)", | 69 'mac-mountainlion': 'WebKit Mac10.6 (deps)', |
70 "mac-mavericks": "WebKit Mac10.6 (deps)", | 70 'mac-mavericks': 'WebKit Mac10.6 (deps)', |
71 "mac-retina": "WebKit Mac10.6 (deps)", | 71 'mac-retina': 'WebKit Mac10.6 (deps)', |
72 } | 72 } |
73 | 73 |
74 | 74 |
75 _ports_without_builders = [ | 75 _ports_without_builders = [ |
76 ] | 76 ] |
77 | 77 |
78 | 78 |
79 def builder_path_from_name(builder_name): | 79 def builder_path_from_name(builder_name): |
80 return re.sub(r'[\s().]', '_', builder_name) | 80 return re.sub(r'[\s().]', '_', builder_name) |
81 | 81 |
82 | 82 |
83 def all_builder_names(): | 83 def all_builder_names(): |
84 return sorted(set(_exact_matches.keys())) | 84 return sorted(set(_exact_matches.keys())) |
85 | 85 |
86 | 86 |
87 def all_port_names(): | 87 def all_port_names(): |
88 return sorted(set(map(lambda x: x["port_name"], _exact_matches.values()) + _
ports_without_builders)) | 88 return sorted(set(map(lambda x: x['port_name'], _exact_matches.values()) + _
ports_without_builders)) |
89 | 89 |
90 | 90 |
91 def rebaseline_override_dir(builder_name): | 91 def rebaseline_override_dir(builder_name): |
92 return _exact_matches[builder_name].get("rebaseline_override_dir", None) | 92 return _exact_matches[builder_name].get('rebaseline_override_dir', None) |
93 | 93 |
94 | 94 |
95 def port_name_for_builder_name(builder_name): | 95 def port_name_for_builder_name(builder_name): |
96 return _exact_matches[builder_name]["port_name"] | 96 return _exact_matches[builder_name]['port_name'] |
97 | 97 |
98 | 98 |
99 def specifiers_for_builder(builder_name): | 99 def specifiers_for_builder(builder_name): |
100 return _exact_matches[builder_name]["specifiers"] | 100 return _exact_matches[builder_name]['specifiers'] |
101 | 101 |
102 | 102 |
103 def builder_name_for_port_name(target_port_name): | 103 def builder_name_for_port_name(target_port_name): |
104 debug_builder_name = None | 104 debug_builder_name = None |
105 for builder_name, builder_info in _exact_matches.items(): | 105 for builder_name, builder_info in _exact_matches.items(): |
106 if builder_info['port_name'] == target_port_name: | 106 if builder_info['port_name'] == target_port_name: |
107 if 'dbg' in builder_name: | 107 if 'dbg' in builder_name: |
108 debug_builder_name = builder_name | 108 debug_builder_name = builder_name |
109 else: | 109 else: |
110 return builder_name | 110 return builder_name |
111 return debug_builder_name | 111 return debug_builder_name |
112 | 112 |
113 | 113 |
114 def builder_path_for_port_name(port_name): | 114 def builder_path_for_port_name(port_name): |
115 builder_path_from_name(builder_name_for_port_name(port_name)) | 115 builder_path_from_name(builder_name_for_port_name(port_name)) |
116 | 116 |
117 | 117 |
118 def deps_builder_name_for_port_name(target_port_name): | 118 def deps_builder_name_for_port_name(target_port_name): |
119 return _deps_builders.get(target_port_name, None) | 119 return _deps_builders.get(target_port_name, None) |
OLD | NEW |