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
4 # found in the LICENSE file.
17 filter_tests
= json
.load(args
.filter_file
)
19 script_args
= args
.args
20 test_suite
= script_args
[0]
22 with common
.temporary_file() as tempfile_path
:
25 args
.paths
['checkout'], 'build', 'android', 'test_runner.py'),
27 '--release' if 'release' in args
.build_config_fs
.lower() else '--debug',
28 '--suite', test_suite
,
30 '--flakiness-dashboard-server=http://test-results.appspot.com',
31 '--json-results-file', tempfile_path
,
34 cmd
.extend(['--gtest-filter', ':'.join(filter_tests
)])
36 rc
= common
.run_command(cmd
)
38 with
open(tempfile_path
) as f
:
39 results
= json
.load(f
)
41 parsed_results
= common
.parse_gtest_test_results(results
)
45 'failures': parsed_results
['failures'],
51 def main_compile_targets(args
):
52 json
.dump(['${name}_apk'], args
.output
)
55 if __name__
== '__main__':
58 'compile_targets': main_compile_targets
,
60 sys
.exit(common
.run_script(sys
.argv
[1:], funcs
))