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

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

Issue 649683005: Add src-side launcher for telemetry_unittests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix after test Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « testing/scripts/get_compile_targets.py ('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
(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 os.path.join(args.paths['build'], 'scripts', 'tools', 'runit.py'),
22 '--show-path',
23 os.path.join(args.paths['build'], 'scripts', 'slave', 'runtest.py'),
24 '--target', args.build_config_fs,
25 '--xvfb',
26 '--annotate', 'gtest',
27 '--test-type', 'telemetry_unittests',
28 '--builder-name', args.properties['buildername'],
29 '--slave-name', args.properties['slavename'],
30 '--build-number', str(args.properties['buildnumber']),
31 '--run-python-script',
32 os.path.join(common.SRC_DIR, 'tools', 'telemetry', 'run_tests'),
33 '--browser', args.build_config_fs.lower(),
34 '--retry-limit', '3',
35 '--write-full-results-to', tempfile_path,
36 ] + filter_tests)
37
38 with open(tempfile_path) as f:
39 results = json.load(f)
40
41 parsed_results = common.parse_common_test_results(results)
42 failures = parsed_results['unexpected_failures']
43
44 json.dump({
45 'valid': bool(rc <= common.MAX_FAILURES_EXIT_STATUS and
46 ((rc == 0) or failures)),
47 'failures': failures.keys(),
48 }, args.output)
49
50 return rc
51
52
53 def main_compile_targets(args):
54 json.dump(['chrome'], args.output)
55
56
57 if __name__ == '__main__':
58 funcs = {
59 'run': main_run,
60 'compile_targets': main_compile_targets,
61 }
62 sys.exit(common.run_script(sys.argv[1:], funcs))
OLDNEW
« no previous file with comments | « testing/scripts/get_compile_targets.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698