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

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

Issue 670183003: Update from chromium 62675d9fb31fb8cedc40f68e78e8445a74f362e7 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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/scripts/get_compile_targets.py ('k') | third_party/checkstyle/LICENSE » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/env python
2 # Copyright 2014 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 import json
7 import os
8 import sys
9
10
11 import common
12
13
14 def main_run(args):
15 filter_tests = []
16 if args.filter_file:
17 filter_tests = json.load(args.filter_file)
18
19 with common.temporary_file() as tempfile_path:
20 rc = common.run_command([
21 sys.executable,
22 os.path.join(args.paths['build'], 'scripts', 'tools', 'runit.py'),
23 '--show-path',
24 os.path.join(args.paths['build'], 'scripts', 'slave', 'runtest.py'),
25 '--target', args.build_config_fs,
26 '--xvfb',
27 '--annotate', 'gtest',
28 '--test-type', 'telemetry_unittests',
29 '--builder-name', args.properties['buildername'],
30 '--slave-name', args.properties['slavename'],
31 '--build-number', str(args.properties['buildnumber']),
32 '--run-python-script',
33 os.path.join(common.SRC_DIR, 'tools', 'telemetry', 'run_tests'),
34 '--browser', args.build_config_fs.lower(),
35 '--retry-limit', '3',
36 '--write-full-results-to', tempfile_path,
37 ] + filter_tests)
38
39 with open(tempfile_path) as f:
40 results = json.load(f)
41
42 parsed_results = common.parse_common_test_results(results)
43 failures = parsed_results['unexpected_failures']
44
45 json.dump({
46 'valid': bool(rc <= common.MAX_FAILURES_EXIT_STATUS and
47 ((rc == 0) or failures)),
48 'failures': failures.keys(),
49 }, args.output)
50
51 return rc
52
53
54 def main_compile_targets(args):
55 json.dump(['chrome'], args.output)
56
57
58 if __name__ == '__main__':
59 funcs = {
60 'run': main_run,
61 'compile_targets': main_compile_targets,
62 }
63 sys.exit(common.run_script(sys.argv[1:], funcs))
OLDNEW
« no previous file with comments | « testing/scripts/get_compile_targets.py ('k') | third_party/checkstyle/LICENSE » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698