| OLD | NEW |
| (Empty) |
| 1 #!/usr/bin/env python | |
| 2 # Copyright 2016 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. | |
| 5 | |
| 6 """Wrapper for the SyzyAsan integration tests.""" | |
| 7 | |
| 8 | |
| 9 import json | |
| 10 import os | |
| 11 import sys | |
| 12 | |
| 13 | |
| 14 import common | |
| 15 | |
| 16 | |
| 17 # Bring in the SyzyAsan test modules. | |
| 18 SYZYASAN_TEST_DIR = os.path.join(os.path.dirname(__file__), os.pardir, | |
| 19 os.pardir, 'chrome', 'test', 'kasko') | |
| 20 SYZYASAN_INTEGRATION_TEST = os.path.join(SYZYASAN_TEST_DIR, | |
| 21 'syzyasan_integration_test.py') | |
| 22 | |
| 23 | |
| 24 def main_run(args): | |
| 25 if not sys.platform.startswith('win'): | |
| 26 json.dump({ | |
| 27 'valid': False, | |
| 28 'failures': ['This script should only be called on win32.'], | |
| 29 }, args.output) | |
| 30 | |
| 31 with common.temporary_file() as tempfile_path: | |
| 32 syzyasan_integration_test_res = common.run_integration_test( | |
| 33 SYZYASAN_INTEGRATION_TEST, | |
| 34 ['--log-to-json', tempfile_path], | |
| 35 tempfile_path, args.output) | |
| 36 | |
| 37 return syzyasan_integration_test_res | |
| 38 | |
| 39 | |
| 40 def main_compile_targets(args): | |
| 41 json.dump(['chrome', 'chromedriver'], args.output) | |
| 42 | |
| 43 | |
| 44 if __name__ == '__main__': | |
| 45 funcs = { | |
| 46 'run': main_run, | |
| 47 'compile_targets': main_compile_targets, | |
| 48 } | |
| 49 sys.exit(common.run_script(sys.argv[1:], funcs)) | |
| OLD | NEW |