Permission message rules: Each rule must have >= 1 required permissions
[chromium-blink-merge.git] / testing / scripts / nacl_integration.py
blobf308b78b1cbfcdd85f083f45070106e58d4ce341
1 #!/usr/bin/env python
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.
6 import json
7 import os
8 import sys
11 import common
14 def main_run(args):
15 filter_tests = []
16 if args.filter_file:
17 filter_tests = json.load(args.filter_file)
19 with common.temporary_file() as tempfile_path:
20 rc = common.run_command([
21 sys.executable,
22 os.path.join(common.SRC_DIR, 'chrome', 'test', 'nacl_test_injection',
23 'buildbot_nacl_integration.py'),
24 '--mode', args.build_config_fs,
25 '--json_build_results_output_file', tempfile_path,
26 ] + filter_tests)
28 with open(tempfile_path) as f:
29 results = json.load(f)
32 json.dump({
33 'valid': True,
34 'failures': [f['raw_name'] for f in results],
35 }, args.output)
37 return rc
40 def main_compile_targets(args):
41 json.dump(['chrome'], args.output)
44 if __name__ == '__main__':
45 funcs = {
46 'run': main_run,
47 'compile_targets': main_compile_targets,
49 sys.exit(common.run_script(sys.argv[1:], funcs))