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