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

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

Issue 2214883002: [Android] Add known devices flag for host_info. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add warning known_devices_file is used only in host_info Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | testing/scripts/host_info.py » ('j') | testing/scripts/host_info.py » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 argparse 5 import argparse
6 import contextlib 6 import contextlib
7 import json 7 import json
8 import os 8 import os
9 import subprocess 9 import subprocess
10 import sys 10 import sys
(...skipping 28 matching lines...) Expand all
39 parser.add_argument('--properties', type=parse_json, default={}) 39 parser.add_argument('--properties', type=parse_json, default={})
40 # Args contains per-invocation arguments that potentially change the 40 # Args contains per-invocation arguments that potentially change the
41 # behavior of the script. 41 # behavior of the script.
42 parser.add_argument('--args', type=parse_json, default=[]) 42 parser.add_argument('--args', type=parse_json, default=[])
43 43
44 parser.add_argument( 44 parser.add_argument(
45 '--use-src-side-runtest-py', action='store_true', 45 '--use-src-side-runtest-py', action='store_true',
46 help='Use the src-side copy of runtest.py, as opposed to the build-side ' 46 help='Use the src-side copy of runtest.py, as opposed to the build-side '
47 'one') 47 'one')
48 48
49 parser.add_argument('--known-devices-file',
50 help='Path to list of known android devices on host. '
51 'Only used for host_info.')
52
49 subparsers = parser.add_subparsers() 53 subparsers = parser.add_subparsers()
50 54
51 run_parser = subparsers.add_parser('run') 55 run_parser = subparsers.add_parser('run')
52 run_parser.add_argument( 56 run_parser.add_argument(
53 '--output', type=argparse.FileType('w'), required=True) 57 '--output', type=argparse.FileType('w'), required=True)
54 run_parser.add_argument('--filter-file', type=argparse.FileType('r')) 58 run_parser.add_argument('--filter-file', type=argparse.FileType('r'))
55 run_parser.set_defaults(func=funcs['run']) 59 run_parser.set_defaults(func=funcs['run'])
56 60
57 run_parser = subparsers.add_parser('compile_targets') 61 run_parser = subparsers.add_parser('compile_targets')
58 run_parser.add_argument( 62 run_parser.add_argument(
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 [sys.executable, script_to_run] + extra_args) 167 [sys.executable, script_to_run] + extra_args)
164 168
165 with open(log_file) as f: 169 with open(log_file) as f:
166 failures = json.load(f) 170 failures = json.load(f)
167 json.dump({ 171 json.dump({
168 'valid': integration_test_res == 0, 172 'valid': integration_test_res == 0,
169 'failures': failures, 173 'failures': failures,
170 }, output) 174 }, output)
171 175
172 return integration_test_res 176 return integration_test_res
OLDNEW
« no previous file with comments | « no previous file | testing/scripts/host_info.py » ('j') | testing/scripts/host_info.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698