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.
17 filter_tests
= json
.load(args
.filter_file
)
19 test_args
= ['--retry-limit', '3']
20 if 'android' == args
.properties
.get('target_platform'):
22 '--browser', 'android-chromium',
23 '--device', 'android',
24 '--android-blacklist-file',
25 os
.path
.join(args
.paths
['checkout'], 'out', 'bad_devices.json'),
28 test_args
+= ['--browser', args
.build_config_fs
.lower()]
30 with common
.temporary_file() as tempfile_path
:
31 test_args
+= ['--write-full-results-to', tempfile_path
]
32 rc
= common
.run_runtest(args
, [
33 '--test-type', 'telemetry_perf_unittests',
34 '--run-python-script',
35 os
.path
.join(common
.SRC_DIR
, 'tools', 'perf', 'run_tests')
36 ] + test_args
+ filter_tests
)
38 with
open(tempfile_path
) as f
:
39 results
= json
.load(f
)
41 parsed_results
= common
.parse_common_test_results(results
, test_separator
='.')
42 failures
= parsed_results
['unexpected_failures']
45 'valid': bool(rc
<= common
.MAX_FAILURES_EXIT_STATUS
and
46 ((rc
== 0) or failures
)),
47 'failures': failures
.keys(),
53 def main_compile_targets(args
):
54 if 'android' == args
.properties
.get('target_platform'):
55 json
.dump(['chrome_public_apk'], args
.output
)
57 json
.dump(['chrome'], args
.output
)
60 if __name__
== '__main__':
63 'compile_targets': main_compile_targets
,
65 sys
.exit(common
.run_script(sys
.argv
[1:], funcs
))