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

Unified Diff: tools/isolate/fix_test_cases.py

Issue 10876080: Get fix_test_cases.py to run on Windows (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 4 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/isolate/fix_test_cases.py
diff --git a/tools/isolate/fix_test_cases.py b/tools/isolate/fix_test_cases.py
index 057765ad8695cf97a0bc443c3cdd69ed2b23ed28..5201afab33af5d94bd70359ab3861dfbb0e9f5a0 100755
--- a/tools/isolate/fix_test_cases.py
+++ b/tools/isolate/fix_test_cases.py
@@ -62,13 +62,10 @@ def run_all(result, shard_index, shard_count):
env['GTEST_SHARD_INDEX'] = str(shard_index)
env['GTEST_TOTAL_SHARDS'] = str(shard_count)
cmd = [sys.executable, 'isolate.py', 'run', '-r', result]
- return_code = subprocess.call(cmd, env=env)
+ subprocess.call(cmd, env=env)
if not os.path.isfile(result_file):
print >> sys.stderr, 'Failed to find %s' % result_file
return None
- if return_code:
- print >> sys.stderr, 'Failed to run isolate.py run'
- return None
with open(result_file) as f:
try:
data = json.load(f)
@@ -168,15 +165,18 @@ def fix_all(result, shard_index, shard_count):
def main():
parser = run_test_cases.OptionParserWithTestSharding(
usage='%prog <option> [test]')
+ parser.add_option('-d', '--dir', default='../../out/Release',
M-A Ruel 2012/08/27 19:24:34 (Note that I use ninja on Windows)
+ help='The directory containing the the test executable and '
+ 'result file. Defaults to %default')
options, args = parser.parse_args()
if len(args) != 1:
- parser.error('Use with the name of the test only, e.g. "unit_tests"')
+ parser.error('Use with the name of the test only, e.g. unit_tests')
basename = args[0]
- executable = '../../out/Release/%s' % basename
+ executable = os.path.join(options.dir, basename)
result = '%s.results' % executable
- if sys.platform == 'win32':
+ if sys.platform in('win32', 'cygwin'):
executable += '.exe'
if not os.path.isfile(executable):
print >> sys.stderr, (
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698