OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 # Copyright (c) 2008 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2008 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """Platform-specific utility methods shared by several scripts.""" | 6 """Platform-specific utility methods shared by several scripts.""" |
7 | 7 |
8 import os | 8 import os |
9 import re | 9 import re |
10 import signal | 10 import signal |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 os.kill(server_process.pid, signal.SIGTERM) | 154 os.kill(server_process.pid, signal.SIGTERM) |
155 | 155 |
156 def WDiffExecutablePath(self): | 156 def WDiffExecutablePath(self): |
157 """Path to the WDiff executable, which we assume is already installed and | 157 """Path to the WDiff executable, which we assume is already installed and |
158 in the user's $PATH. | 158 in the user's $PATH. |
159 """ | 159 """ |
160 return 'wdiff' | 160 return 'wdiff' |
161 | 161 |
162 def ImageCompareExecutablePath(self, target): | 162 def ImageCompareExecutablePath(self, target): |
163 """Path to the image_diff binary.""" | 163 """Path to the image_diff binary.""" |
164 # See mmoss TODO below. | 164 return PathFromBase('sconsbuild', target, 'image_diff') |
165 return PathFromBase('chrome', 'Hammer', 'image_diff') | |
166 | 165 |
167 def TestShellBinary(self): | 166 def TestShellBinary(self): |
168 """The name of the binary for TestShell.""" | 167 """The name of the binary for TestShell.""" |
169 return 'test_shell' | 168 return 'test_shell' |
170 | 169 |
171 def TestShellBinaryPath(self, target): | 170 def TestShellBinaryPath(self, target): |
172 """Return the platform-specific binary path for our TestShell. | 171 """Return the platform-specific binary path for our TestShell. |
173 | 172 |
174 Args: | 173 Args: |
175 target: Build target mode (debug or release) | 174 target: Build target mode (debug or release) |
176 """ | 175 """ |
177 # TODO(mmoss) - hard-coded to "Hammer" for now until I look into the scons | 176 return PathFromBase('sconsbuild', target, self.TestShellBinary()) |
178 # output directory logic (and how/if it will change once Linux supports | |
179 # multiple debug/release targets). | |
180 try: | |
181 path = PathFromBase('webkit', 'Hammer', self.TestShellBinary()) | |
182 except google.path_utils.PathNotFound: | |
183 path = PathFromBase('chrome', 'Hammer', self.TestShellBinary()) | |
184 return path | |
185 | 177 |
186 def FuzzyMatchBinaryPath(self): | 178 def FuzzyMatchBinaryPath(self): |
187 """Return the path to the fuzzy matcher binary.""" | 179 """Return the path to the fuzzy matcher binary.""" |
188 return PathFromBase('third_party', 'fuzzymatch', 'fuzzymatch') | 180 return PathFromBase('third_party', 'fuzzymatch', 'fuzzymatch') |
189 | 181 |
190 def TestListPlatformDir(self): | 182 def TestListPlatformDir(self): |
191 """Return the platform-specific directory for where the test lists live""" | 183 """Return the platform-specific directory for where the test lists live""" |
192 return 'linux' | 184 return 'linux' |
193 | 185 |
194 def PlatformDir(self): | 186 def PlatformDir(self): |
195 """Returns the most specific directory name where platform-specific | 187 """Returns the most specific directory name where platform-specific |
196 results live. | 188 results live. |
197 """ | 189 """ |
198 return 'chromium-linux' | 190 return 'chromium-linux' |
OLD | NEW |