Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(351)

Side by Side Diff: build/android/test_runner.gypi

Issue 1208483004: Make instrumentation test dependency on a support APK explicit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use GYP and GN to set whether the support apk is needed Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 15 matching lines...) Expand all
26 # 'isolate_file': 'path/to/instrumentation_test.isolate' # string 26 # 'isolate_file': 'path/to/instrumentation_test.isolate' # string
27 # }, 27 # },
28 # 'includes': ['path/to/this/gypi/file'], 28 # 'includes': ['path/to/this/gypi/file'],
29 # } 29 # }
30 # 30 #
31 31
32 { 32 {
33 'variables': { 33 'variables': {
34 'variables': { 34 'variables': {
35 'isolate_file%': '', 35 'isolate_file%': '',
36 'support_apk_name%': '',
36 }, 37 },
37 'test_runner_args': ['--output-directory', '<(PRODUCT_DIR)'], 38 'test_runner_args': ['--output-directory', '<(PRODUCT_DIR)'],
38 'conditions': [ 39 'conditions': [
39 ['test_type == "gtest"', { 40 ['test_type == "gtest"', {
40 'test_runner_args': ['--suite', '<(test_suite_name)'], 41 'test_runner_args': ['--suite', '<(test_suite_name)'],
41 'script_name': 'run_<(test_suite_name)', 42 'script_name': 'run_<(test_suite_name)',
42 }], 43 }],
43 ['test_type == "instrumentation"', { 44 ['test_type == "instrumentation"', {
44 'test_runner_args': ['--test-apk', '<(apk_name)'], 45 'test_runner_args': ['--test-apk', '<(apk_name)'],
45 'script_name': 'run_<(_target_name)', 46 'script_name': 'run_<(_target_name)',
47 'conditions': [
48 ['support_apk_name != ""', {
49 'test_runner_args+': ['--support-apk', '<(support_apk_name)'],
50 }],
51 ],
46 }], 52 }],
47 ['isolate_file != ""', { 53 ['isolate_file != ""', {
48 'test_runner_args': ['--isolate-file-path', '<(isolate_file)'] 54 'test_runner_args': ['--isolate-file-path', '<(isolate_file)']
dgn 2015/06/24 16:03:04 My change works but I don't quite understand how i
jbudorick 2015/06/24 17:46:39 gyp seems to append to lists even if + isn't inclu
49 }], 55 }],
50 ], 56 ],
51 }, 57 },
52 'actions': [ 58 'actions': [
53 { 59 {
54 'action_name': 'create_test_runner_script_<(script_name)', 60 'action_name': 'create_test_runner_script_<(script_name)',
55 'message': 'Creating test runner script <(script_name)', 61 'message': 'Creating test runner script <(script_name)',
56 'variables': { 62 'variables': {
57 'script_output_path': '<(PRODUCT_DIR)/bin/<(script_name)', 63 'script_output_path': '<(PRODUCT_DIR)/bin/<(script_name)',
58 }, 64 },
59 'inputs': [ 65 'inputs': [
60 '<(DEPTH)/build/android/gyp/create_test_runner_script.py', 66 '<(DEPTH)/build/android/gyp/create_test_runner_script.py',
61 ], 67 ],
62 'outputs': [ 68 'outputs': [
63 '<(script_output_path)' 69 '<(script_output_path)'
64 ], 70 ],
65 'action': [ 71 'action': [
66 'python', '<(DEPTH)/build/android/gyp/create_test_runner_script.py', 72 'python', '<(DEPTH)/build/android/gyp/create_test_runner_script.py',
67 '--script-output-path=<(script_output_path)', 73 '--script-output-path=<(script_output_path)',
68 '<(test_type)', '<@(test_runner_args)', 74 '<(test_type)', '<@(test_runner_args)',
69 ], 75 ],
70 }, 76 },
71 ], 77 ],
72 } 78 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698