Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(76)

Side by Side Diff: tools/valgrind/common.py

Issue 8636008: Update chrome_tests.sh to run DrMemory from Cygwin (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/valgrind/chrome_tests.sh ('k') | tools/valgrind/valgrind_test.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2011 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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 "start_thread", 184 "start_thread",
185 "main", 185 "main",
186 "BaseThreadInitThunk", 186 "BaseThreadInitThunk",
187 ] 187 ]
188 188
189 if use_re_wildcards: 189 if use_re_wildcards:
190 for i in range(0, len(ret)): 190 for i in range(0, len(ret)):
191 ret[i] = ret[i].replace('*', '.*').replace('?', '.') 191 ret[i] = ret[i].replace('*', '.*').replace('?', '.')
192 192
193 return ret 193 return ret
194
195 def NormalizeWindowsPath(path):
196 """If we're using Cygwin Python, turn the path into a Windows path.
197
198 Don't turn forward slashes into backslashes for easier copy-pasting and
199 escaping.
200
201 TODO(rnk): If we ever want to cut out the subprocess invocation, we can use
202 _winreg to get the root Cygwin directory from the registry key:
203 HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin\setup\rootdir.
204 """
205 if sys.platform.startswith("cygwin"):
206 p = subprocess.Popen(["cygpath", "-m", path],
207 stdout=subprocess.PIPE,
208 stderr=subprocess.PIPE)
209 (out, err) = p.communicate()
210 if err:
211 logging.warning("WARNING: cygpath error: %s", err)
212 return out.strip()
213 else:
214 return path
OLDNEW
« no previous file with comments | « tools/valgrind/chrome_tests.sh ('k') | tools/valgrind/valgrind_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698