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 23 matching lines...) Expand all Loading... |
34 'variables': { | 34 'variables': { |
35 'isolate_file%': '', | 35 'isolate_file%': '', |
36 }, | 36 }, |
37 'test_runner_args': ['--output-directory', '<(PRODUCT_DIR)'], | 37 'test_runner_args': ['--output-directory', '<(PRODUCT_DIR)'], |
38 'conditions': [ | 38 'conditions': [ |
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': ['--test-apk', '<(apk_name)'], | 44 'test_runner_args': [ |
| 45 '--apk-under-test', '>(tested_apk_path)', |
| 46 '--test-apk', '>(final_apk_path)', |
| 47 ], |
45 'script_name': 'run_<(_target_name)', | 48 'script_name': 'run_<(_target_name)', |
46 }], | 49 }], |
47 ['isolate_file != ""', { | 50 ['isolate_file != ""', { |
48 'test_runner_args': ['--isolate-file-path', '<(isolate_file)'] | 51 'test_runner_args': ['--isolate-file-path', '<(isolate_file)'] |
49 }], | 52 }], |
50 ], | 53 ], |
51 }, | 54 }, |
52 'actions': [ | 55 'actions': [ |
53 { | 56 { |
54 'action_name': 'create_test_runner_script_<(script_name)', | 57 'action_name': 'create_test_runner_script_<(script_name)', |
55 'message': 'Creating test runner script <(script_name)', | 58 'message': 'Creating test runner script <(script_name)', |
56 'variables': { | 59 'variables': { |
57 'script_output_path': '<(PRODUCT_DIR)/bin/<(script_name)', | 60 'script_output_path': '<(PRODUCT_DIR)/bin/<(script_name)', |
58 }, | 61 }, |
59 'inputs': [ | 62 'inputs': [ |
60 '<(DEPTH)/build/android/gyp/create_test_runner_script.py', | 63 '<(DEPTH)/build/android/gyp/create_test_runner_script.py', |
61 ], | 64 ], |
62 'outputs': [ | 65 'outputs': [ |
63 '<(script_output_path)' | 66 '<(script_output_path)' |
64 ], | 67 ], |
65 'action': [ | 68 'action': [ |
66 'python', '<(DEPTH)/build/android/gyp/create_test_runner_script.py', | 69 'python', '<(DEPTH)/build/android/gyp/create_test_runner_script.py', |
67 '--script-output-path=<(script_output_path)', | 70 '--script-output-path=<(script_output_path)', |
68 '<(test_type)', '<@(test_runner_args)', | 71 '<(test_type)', '<@(test_runner_args)', |
69 ], | 72 ], |
70 }, | 73 }, |
71 ], | 74 ], |
72 } | 75 } |
OLD | NEW |