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.
15 return sys
.platform
== 'cygwin' or sys
.platform
.startswith('win')
21 filter_tests
= json
.load(args
.filter_file
)
23 perf_id
= args
.properties
.get('perf-id')
24 script_args
= args
.args
25 test_suite
= script_args
[0]
27 script_args
[0] += '.exe'
29 with common
.temporary_file() as tempfile_path
:
31 '--target', args
.build_config_fs
,
32 '--annotate', 'graphing',
34 '--perf-dashboard-id', test_suite
,
35 '--results-url', args
.properties
.get('results-url'),
36 '--slave-name', args
.properties
.get('slavename'),
37 '--builder-name', args
.properties
.get('buildername'),
38 '--build-number', str(args
.properties
.get('buildnumber')),
39 '--log-processor-output-file', tempfile_path
,
40 '--test-type', test_suite
,
43 if 'android' == args
.properties
.get('target_platform'):
46 '--run-python-script', os
.path
.join(
47 args
.paths
['checkout'], 'build', 'android', 'test_runner.py'),
49 '--suite', test_suite
,
53 gtest_args
.extend(['--xvfb'])
54 gtest_args
.extend(script_args
)
56 rc
= common
.run_runtest(args
, gtest_args
+ filter_tests
)
58 with
open(tempfile_path
) as f
:
59 results
= json
.load(f
)
62 'valid': bool(rc
== 0),
63 'failures': results
['failed'],
69 def main_compile_targets(args
):
70 if 'android' == args
.properties
.get('target_platform'):
71 json
.dump(['${name}_apk'], args
.output
)
73 json
.dump(['$name'], args
.output
)
76 if __name__
== '__main__':
79 'compile_targets': main_compile_targets
,
81 sys
.exit(common
.run_script(sys
.argv
[1:], funcs
))