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 25 matching lines...) Expand all Loading... |
36 # }, | 36 # }, |
37 # 'includes': ['path/to/this/gypi/file'], | 37 # 'includes': ['path/to/this/gypi/file'], |
38 # } | 38 # } |
39 # | 39 # |
40 | 40 |
41 { | 41 { |
42 'variables': { | 42 'variables': { |
43 'variables': { | 43 'variables': { |
44 'additional_apks%': [], | 44 'additional_apks%': [], |
45 'isolate_file%': '', | 45 'isolate_file%': '', |
| 46 'shard_timeout%': '', |
46 'test_runner_path%': '', | 47 'test_runner_path%': '', |
47 }, | 48 }, |
48 'test_runner_args': ['--output-directory', '<(PRODUCT_DIR)'], | 49 'test_runner_args': ['--output-directory', '<(PRODUCT_DIR)'], |
49 'conditions': [ | 50 'conditions': [ |
50 ['test_type == "gtest"', { | 51 ['test_type == "gtest"', { |
51 'test_runner_args': ['--suite', '<(test_suite_name)'], | 52 'test_runner_args': ['--suite', '<(test_suite_name)'], |
52 'script_name': 'run_<(test_suite_name)', | 53 'script_name': 'run_<(test_suite_name)', |
53 }], | 54 }], |
54 ['test_type == "instrumentation"', { | 55 ['test_type == "instrumentation"', { |
55 'test_runner_args': [ | 56 'test_runner_args': [ |
(...skipping 12 matching lines...) Expand all Loading... |
68 ['test_type == "junit"', { | 69 ['test_type == "junit"', { |
69 'test_runner_args': ['--test-suite', '<(_target_name)'], | 70 'test_runner_args': ['--test-suite', '<(_target_name)'], |
70 'script_name': 'run_<(_target_name)', | 71 'script_name': 'run_<(_target_name)', |
71 }], | 72 }], |
72 ['additional_apks != []', { | 73 ['additional_apks != []', { |
73 'test_runner_args': ['--additional-apk-list', '>(additional_apks)'], | 74 'test_runner_args': ['--additional-apk-list', '>(additional_apks)'], |
74 }], | 75 }], |
75 ['isolate_file != ""', { | 76 ['isolate_file != ""', { |
76 'test_runner_args': ['--isolate-file-path', '<(isolate_file)'] | 77 'test_runner_args': ['--isolate-file-path', '<(isolate_file)'] |
77 }], | 78 }], |
| 79 ['shard_timeout != ""', { |
| 80 'test_runner_args': ['--shard-timeout', '<(shard_timeout)'] |
| 81 }], |
78 ['test_runner_path != ""', { | 82 ['test_runner_path != ""', { |
79 'test_runner_args': ['--test-runner-path', '<(test_runner_path)'] | 83 'test_runner_args': ['--test-runner-path', '<(test_runner_path)'] |
80 }], | 84 }], |
81 ], | 85 ], |
82 }, | 86 }, |
83 'actions': [ | 87 'actions': [ |
84 { | 88 { |
85 'action_name': 'create_test_runner_script_<(script_name)', | 89 'action_name': 'create_test_runner_script_<(script_name)', |
86 'message': 'Creating test runner script <(script_name)', | 90 'message': 'Creating test runner script <(script_name)', |
87 'variables': { | 91 'variables': { |
88 'script_output_path': '<(PRODUCT_DIR)/bin/<(script_name)', | 92 'script_output_path': '<(PRODUCT_DIR)/bin/<(script_name)', |
89 }, | 93 }, |
90 'inputs': [ | 94 'inputs': [ |
91 '<(DEPTH)/build/android/gyp/create_test_runner_script.py', | 95 '<(DEPTH)/build/android/gyp/create_test_runner_script.py', |
92 ], | 96 ], |
93 'outputs': [ | 97 'outputs': [ |
94 '<(script_output_path)' | 98 '<(script_output_path)' |
95 ], | 99 ], |
96 'action': [ | 100 'action': [ |
97 'python', '<(DEPTH)/build/android/gyp/create_test_runner_script.py', | 101 'python', '<(DEPTH)/build/android/gyp/create_test_runner_script.py', |
98 '--script-output-path=<(script_output_path)', | 102 '--script-output-path=<(script_output_path)', |
99 '<(test_type)', '<@(test_runner_args)', | 103 '<(test_type)', '<@(test_runner_args)', |
100 ], | 104 ], |
101 }, | 105 }, |
102 ], | 106 ], |
103 } | 107 } |
OLD | NEW |