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 '--test-type', 'telemetry_unittests',
22 '--run-python-script',
23 os
.path
.join(common
.SRC_DIR
, 'tools', 'telemetry', 'run_tests'),
24 '--browser', args
.build_config_fs
.lower(),
26 '--write-full-results-to', tempfile_path
,
29 with
open(tempfile_path
) as f
:
30 results
= json
.load(f
)
32 parsed_results
= common
.parse_common_test_results(results
, test_separator
='.')
33 failures
= parsed_results
['unexpected_failures']
36 'valid': bool(rc
<= common
.MAX_FAILURES_EXIT_STATUS
and
37 ((rc
== 0) or failures
)),
38 'failures': failures
.keys(),
44 def main_compile_targets(args
):
45 json
.dump(['chrome'], args
.output
)
48 if __name__
== '__main__':
51 'compile_targets': main_compile_targets
,
53 sys
.exit(common
.run_script(sys
.argv
[1:], funcs
))