Upstream version 10.38.222.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Tools / TestResultServer / handlers / master_config.py
1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 # FIXME: Master name is deprecated. Remove it once all the bots have stopped
6 # uploading with that name.
7 #
8 # FIXME: The concept of groups is being deprecated.  Once it's removed from
9 # the flakiness dashboard, this whole map can go away.
10 _masters = {
11     'chromium.chromiumos': {
12         'name': 'ChromiumChromiumOS',
13         'groups': ['@ToT ChromeOS']
14     },
15     'chromium.fyi': {
16         'name': 'ChromiumFYI',
17         'groups': ['@ToT Chromium FYI']
18     },
19     'chromium.gpu': {
20         'name': 'ChromiumGPU',
21         'groups': ['@ToT Chromium']
22     },
23     'chromium.gpu.fyi': {
24         'name': 'ChromiumGPUFYI',
25         'groups': ['@ToT Chromium FYI']
26     },
27     'chromium.linux': {
28         'name': 'ChromiumLinux',
29         'groups': ['@ToT Chromium']
30     },
31     'chromium.mac': {
32         'name': 'ChromiumMac',
33         'groups': ['@ToT Chromium']
34     },
35     'chromium.webkit': {
36         'name': 'ChromiumWebkit',
37         'groups': ['@ToT Chromium', '@ToT Blink'],
38     },
39     'chromium.win': {
40         'name': 'ChromiumWin',
41         'groups': ['@ToT Chromium']
42     },
43     'tryserver.chromium.gpu': {
44         'name': 'GpuTryServer',
45         'groups': ['TryServers']
46     },
47     'client.v8': {
48         'name': 'V8',
49         'groups': ['@ToT V8']
50     },
51 }
52
53 _master_name_to_url_name = dict((v['name'], k) for k, v in _masters.items())
54
55
56 def getMaster(url_name):
57     result = _masters.get(url_name)
58     if result:
59         # Note: we copy off result['groups'] to ensure a full deep copy of the data.
60         return { 'name': result['name'], 'url_name': url_name, 'groups': result['groups'][:] }
61     return None
62
63 def getMasterByMasterName(master_name):
64     url_name = _master_name_to_url_name.get(master_name)
65     if url_name:
66         return getMaster(url_name)
67     return None
68
69 def getAllMasters():
70     for master in _masters:
71         yield getMaster(master)