| OLD | NEW |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 # Generates a script in the output bin directory which runs the test | 5 # Generates a script in the output bin directory which runs the test |
| 6 # target using the test runner script in build/android/pylib/test_runner.py. | 6 # target using the test runner script in build/android/pylib/test_runner.py. |
| 7 # | 7 # |
| 8 # To use this, include this file in a gtest or instrumentation test target. | 8 # To use this, include this file in a gtest or instrumentation test target. |
| 9 # { | 9 # { |
| 10 # 'target_name': 'gtest', | 10 # 'target_name': 'gtest', |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 ['test_type == "gtest"', { | 39 ['test_type == "gtest"', { |
| 40 'test_runner_args': ['--suite', '<(test_suite_name)'], | 40 'test_runner_args': ['--suite', '<(test_suite_name)'], |
| 41 'script_name': 'run_<(test_suite_name)', | 41 'script_name': 'run_<(test_suite_name)', |
| 42 }], | 42 }], |
| 43 ['test_type == "instrumentation"', { | 43 ['test_type == "instrumentation"', { |
| 44 'test_runner_args': [ | 44 'test_runner_args': [ |
| 45 '--apk-under-test', '>(tested_apk_path)', | 45 '--apk-under-test', '>(tested_apk_path)', |
| 46 '--test-apk', '>(final_apk_path)', | 46 '--test-apk', '>(final_apk_path)', |
| 47 ], | 47 ], |
| 48 'script_name': 'run_<(_target_name)', | 48 'script_name': 'run_<(_target_name)', |
| 49 'conditions': [ |
| 50 ['emma_instrument != 0', { |
| 51 'test_runner_args': [ |
| 52 '--coverage-dir', '<(PRODUCT_DIR)/coverage', |
| 53 ], |
| 54 }], |
| 55 ], |
| 49 }], | 56 }], |
| 50 ['isolate_file != ""', { | 57 ['isolate_file != ""', { |
| 51 'test_runner_args': ['--isolate-file-path', '<(isolate_file)'] | 58 'test_runner_args': ['--isolate-file-path', '<(isolate_file)'] |
| 52 }], | 59 }], |
| 53 ], | 60 ], |
| 54 }, | 61 }, |
| 55 'actions': [ | 62 'actions': [ |
| 56 { | 63 { |
| 57 'action_name': 'create_test_runner_script_<(script_name)', | 64 'action_name': 'create_test_runner_script_<(script_name)', |
| 58 'message': 'Creating test runner script <(script_name)', | 65 'message': 'Creating test runner script <(script_name)', |
| 59 'variables': { | 66 'variables': { |
| 60 'script_output_path': '<(PRODUCT_DIR)/bin/<(script_name)', | 67 'script_output_path': '<(PRODUCT_DIR)/bin/<(script_name)', |
| 61 }, | 68 }, |
| 62 'inputs': [ | 69 'inputs': [ |
| 63 '<(DEPTH)/build/android/gyp/create_test_runner_script.py', | 70 '<(DEPTH)/build/android/gyp/create_test_runner_script.py', |
| 64 ], | 71 ], |
| 65 'outputs': [ | 72 'outputs': [ |
| 66 '<(script_output_path)' | 73 '<(script_output_path)' |
| 67 ], | 74 ], |
| 68 'action': [ | 75 'action': [ |
| 69 'python', '<(DEPTH)/build/android/gyp/create_test_runner_script.py', | 76 'python', '<(DEPTH)/build/android/gyp/create_test_runner_script.py', |
| 70 '--script-output-path=<(script_output_path)', | 77 '--script-output-path=<(script_output_path)', |
| 71 '<(test_type)', '<@(test_runner_args)', | 78 '<(test_type)', '<@(test_runner_args)', |
| 72 ], | 79 ], |
| 73 }, | 80 }, |
| 74 ], | 81 ], |
| 75 } | 82 } |
| OLD | NEW |