OLD | NEW |
1 # Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2009 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import logging | 5 import logging |
6 import os | 6 import os |
7 import signal | 7 import signal |
8 import subprocess | 8 import subprocess |
9 import sys | 9 import sys |
10 import time | 10 import time |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 | 135 |
136 | 136 |
137 def IsWine(): | 137 def IsWine(): |
138 """This needs to be set by the script that starts the buildbot, i.e. | 138 """This needs to be set by the script that starts the buildbot, i.e. |
139 /etc/init.d/buildbot, or manually on the command line.""" | 139 /etc/init.d/buildbot, or manually on the command line.""" |
140 return (os.environ.get('WINE') and | 140 return (os.environ.get('WINE') and |
141 os.environ.get('WINEPREFIX') and | 141 os.environ.get('WINEPREFIX') and |
142 os.environ.get('WINESERVER')) | 142 os.environ.get('WINESERVER')) |
143 | 143 |
144 | 144 |
145 def PlatformName(): | 145 def PlatformNames(): |
146 """Return a string to be used in paths for the platform.""" | 146 """Return an array of string to be used in paths for the platform |
| 147 (e.g. suppressions, gtest filters, ignore files etc.) |
| 148 The first element of the array describes the 'main' platform |
| 149 """ |
147 # This has to be before IsLinux() | 150 # This has to be before IsLinux() |
148 if IsWine(): | 151 if IsWine(): |
149 return 'wine' | 152 return ['wine', 'win32'] |
150 if IsLinux(): | 153 if IsLinux(): |
151 return 'linux' | 154 return ['linux'] |
152 if IsMac(): | 155 if IsMac(): |
153 return 'mac' | 156 return ['mac'] |
154 if IsWindows(): | 157 if IsWindows(): |
155 return 'win32' | 158 return ['win32'] |
156 raise NotImplementedError('Unknown platform "%s".' % sys.platform) | 159 raise NotImplementedError('Unknown platform "%s".' % sys.platform) |
OLD | NEW |