summaryrefslogtreecommitdiffstats
path: root/build/android/pylib/remote/device/dummy/dummy.gyp
blob: 46e2d484f151029a215e1337c6e2b484ab9dea31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# Running gtests on a remote device via am instrument requires both an "app"
# APK and a "test" APK with different package names. Our gtests only use one
# APK, so we build a dummy APK to upload as the app.

{
  'variables': {
    'remote_device_dummy_apk_name': 'remote_device_dummy',
    'remote_device_dummy_apk_path': '<(PRODUCT_DIR)/apks/<(remote_device_dummy_apk_name).apk',
  },
  'targets': [
    {
      # GN: //build/android/pylib/remote/device/dummy:remote_device_dummy_apk
      'target_name': 'remote_device_dummy_apk',
      'type': 'none',
      'variables': {
        'apk_name': '<(remote_device_dummy_apk_name)',
        'final_apk_path': '<(remote_device_dummy_apk_path)',
        'java_in_dir': '.',
        'android_manifest_path': '../../../../../../build/android/AndroidManifest.xml',
      },
      'includes': [
        '../../../../../../build/java_apk.gypi',
      ]
    },
    {
      'target_name': 'require_remote_device_dummy_apk',
      'message': 'Making sure <(remote_device_dummy_apk_path) has been built.',
      'type': 'none',
      'variables': {
        'required_file': '<(PRODUCT_DIR)/remote_device_dummy_apk/<(remote_device_dummy_apk_name).apk.required',
      },
      'inputs': [
        '<(remote_device_dummy_apk_path)',
      ],
      'outputs': [
        '<(required_file)',
      ],
      'action': [
        'python', '../../build/android/gyp/touch.py', '<(required_file)',
      ],
    }
  ]
}