| 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 }, | |
| 14 'targets': [ | 10 'targets': [ |
| 15 { | 11 { |
| 16 # GN: //build/android/pylib/remote/device/dummy:remote_device_dummy_apk | 12 # GN: //build/android/pylib/remote/device/dummy:remote_device_dummy_apk |
| 17 'target_name': 'remote_device_dummy_apk', | 13 'target_name': 'remote_device_dummy_apk', |
| 18 'type': 'none', | 14 'type': 'none', |
| 19 'variables': { | 15 'variables': { |
| 20 'apk_name': '<(remote_device_dummy_apk_name)', | 16 'apk_name': 'remote_device_dummy', |
| 21 'final_apk_path': '<(remote_device_dummy_apk_path)', | |
| 22 'java_in_dir': '.', | 17 'java_in_dir': '.', |
| 23 'android_manifest_path': '../../../../../../build/android/AndroidManifes
t.xml', | 18 'android_manifest_path': '../../../../../../build/android/AndroidManifes
t.xml', |
| 24 }, | 19 }, |
| 25 'includes': [ | 20 'includes': [ |
| 26 '../../../../../../build/java_apk.gypi', | 21 '../../../../../../build/java_apk.gypi', |
| 27 ] | 22 ] |
| 28 }, | 23 }, |
| 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 } | |
| 46 ] | 24 ] |
| 47 } | 25 } |
| OLD | NEW |