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 # Running gtests on a remote device via am instrument requires both an "app" | 5 # Running gtests on a remote device via am instrument requires both an "app" |
6 # APK and a "test" APK with different package names. Our gtests only use one | 6 # APK and a "test" APK with different package names. Our gtests only use one |
7 # APK, so we build a dummy APK to upload as the app. | 7 # APK, so we build a dummy APK to upload as the app. |
8 | 8 |
9 { | 9 { |
| 10 'variables': { |
| 11 'remote_device_dummy_apk_name': 'remote_device_dummy', |
| 12 'remote_device_dummy_apk_path': '<(PRODUCT_DIR)/apks/<(remote_device_dummy_a
pk_name).apk', |
| 13 }, |
10 'targets': [ | 14 'targets': [ |
11 { | 15 { |
12 # GN: //build/android/pylib/remote/device/dummy:remote_device_dummy_apk | 16 # GN: //build/android/pylib/remote/device/dummy:remote_device_dummy_apk |
13 'target_name': 'remote_device_dummy_apk', | 17 'target_name': 'remote_device_dummy_apk', |
14 'type': 'none', | 18 'type': 'none', |
15 'variables': { | 19 'variables': { |
16 'apk_name': 'remote_device_dummy', | 20 'apk_name': '<(remote_device_dummy_apk_name)', |
| 21 'final_apk_path': '<(remote_device_dummy_apk_path)', |
17 'java_in_dir': '.', | 22 'java_in_dir': '.', |
18 'android_manifest_path': '../../../../../../build/android/AndroidManifes
t.xml', | 23 'android_manifest_path': '../../../../../../build/android/AndroidManifes
t.xml', |
19 }, | 24 }, |
20 'includes': [ | 25 'includes': [ |
21 '../../../../../../build/java_apk.gypi', | 26 '../../../../../../build/java_apk.gypi', |
22 ] | 27 ] |
23 }, | 28 }, |
| 29 { |
| 30 'target_name': 'require_remote_device_dummy_apk', |
| 31 'message': 'Making sure <(remote_device_dummy_apk_path) has been built.', |
| 32 'type': 'none', |
| 33 'variables': { |
| 34 'required_file': '<(PRODUCT_DIR)/remote_device_dummy_apk/<(remote_device
_dummy_apk_name).apk.required', |
| 35 }, |
| 36 'inputs': [ |
| 37 '<(remote_device_dummy_apk_path)', |
| 38 ], |
| 39 'outputs': [ |
| 40 '<(required_file)', |
| 41 ], |
| 42 'action': [ |
| 43 'python', '../../build/android/gyp/touch.py', '<(required_file)', |
| 44 ], |
| 45 } |
24 ] | 46 ] |
25 } | 47 } |
OLD | NEW |