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

Side by Side Diff: testing/scripts/mojo_apptests.py

Issue 1412563007: Run Mojo apptests step on Windows main and cq bots. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use sys.executable in mojo_apptests.py commandline. Created 5 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
« no previous file with comments | « testing/buildbot/chromium.win.json ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2015 The Chromium Authors. All rights reserved. 2 # Copyright 2015 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 import json 6 import json
7 import os 7 import os
8 import sys 8 import sys
9 9
10 10
11 import common 11 import common
12 12
13 13
14 def main_run(args): 14 def main_run(args):
15 runner = os.path.join(common.SRC_DIR, 'mojo', 'tools', 'apptest_runner.py') 15 runner = os.path.join(common.SRC_DIR, 'mojo', 'tools', 'apptest_runner.py')
16 build_dir = os.path.join(common.SRC_DIR, 'out', args.build_config_fs) 16 build_dir = os.path.join(common.SRC_DIR, 'out', args.build_config_fs)
17 17
18 with common.temporary_file() as tempfile_path: 18 with common.temporary_file() as tempfile_path:
19 rc = common.run_command([runner, build_dir, '--verbose', 19 rc = common.run_command([sys.executable, runner, build_dir, '--verbose',
20 '--write-full-results-to', tempfile_path]) 20 '--write-full-results-to', tempfile_path])
21 with open(tempfile_path) as f: 21 with open(tempfile_path) as f:
22 results = json.load(f) 22 results = json.load(f)
23 23
24 parsed_results = common.parse_common_test_results(results, test_separator='.') 24 parsed_results = common.parse_common_test_results(results, test_separator='.')
25 failures = parsed_results['unexpected_failures'] 25 failures = parsed_results['unexpected_failures']
26 26
27 json.dump({ 27 json.dump({
28 'valid': bool(rc <= common.MAX_FAILURES_EXIT_STATUS and 28 'valid': bool(rc <= common.MAX_FAILURES_EXIT_STATUS and
29 ((rc == 0) or failures)), 29 ((rc == 0) or failures)),
30 'failures': failures.keys(), 30 'failures': failures.keys(),
31 }, args.output) 31 }, args.output)
32 32
33 return rc 33 return rc
34 34
35 35
36 def main_compile_targets(args): 36 def main_compile_targets(args):
37 json.dump(['mandoline:tests'], args.output) 37 json.dump(['mandoline:tests'], args.output)
38 38
39 39
40 if __name__ == '__main__': 40 if __name__ == '__main__':
41 funcs = { 41 funcs = {
42 'run': main_run, 42 'run': main_run,
43 'compile_targets': main_compile_targets, 43 'compile_targets': main_compile_targets,
44 } 44 }
45 sys.exit(common.run_script(sys.argv[1:], funcs)) 45 sys.exit(common.run_script(sys.argv[1:], funcs))
OLDNEW
« no previous file with comments | « testing/buildbot/chromium.win.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698