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 with common
.temporary_file() as tempfile_path
:
20 rc
= common
.run_runtest(args
, [
21 '--annotate', 'gtest',
22 '--test-type', 'telemetry_unittests',
23 '--run-python-script',
24 os
.path
.join(common
.SRC_DIR
, 'tools', 'telemetry', 'run_tests'),
25 '--browser', args
.build_config_fs
.lower(),
27 '--write-full-results-to', tempfile_path
,
30 with
open(tempfile_path
) as f
:
31 results
= json
.load(f
)
33 parsed_results
= common
.parse_common_test_results(results
, test_separator
='.')
34 failures
= parsed_results
['unexpected_failures']
37 'valid': bool(rc
<= common
.MAX_FAILURES_EXIT_STATUS
and
38 ((rc
== 0) or failures
)),
39 'failures': failures
.keys(),
45 def main_compile_targets(args
):
46 json
.dump(['chrome'], args
.output
)
49 if __name__
== '__main__':
52 'compile_targets': main_compile_targets
,
54 sys
.exit(common
.run_script(sys
.argv
[1:], funcs
))