Brian Muramatsu | 70a9e3f | 2010-06-25 15:27:09 -0700 | [diff] [blame] | 1 | # |
| 2 | # Copyright (C) 2010 The Android Open Source Project |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | # |
| 16 | |
| 17 | LOCAL_PATH:= $(call my-dir) |
| 18 | include $(CLEAR_VARS) |
| 19 | |
| 20 | LOCAL_MODULE_TAGS := optional |
| 21 | |
| 22 | LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS) |
| 23 | |
Nicholas Sauer | 234dce9 | 2014-10-20 21:54:20 -0700 | [diff] [blame] | 24 | LOCAL_MULTILIB := both |
| 25 | |
Harsh Modi | fe5933d | 2014-08-12 16:52:16 -0700 | [diff] [blame] | 26 | LOCAL_SRC_FILES := $(call all-java-files-under, src) $(call all-Iaidl-files-under, src) |
Brian Muramatsu | 70a9e3f | 2010-06-25 15:27:09 -0700 | [diff] [blame] | 27 | |
Nicholas Sauer | 90f8a23 | 2014-08-17 17:36:53 -0700 | [diff] [blame] | 28 | LOCAL_STATIC_JAVA_LIBRARIES := android-ex-camera2 \ |
Sander Alewijnse | 7e24fda | 2015-03-26 17:41:57 +0000 | [diff] [blame] | 29 | android-support-v4 \ |
Nicholas Sauer | 90f8a23 | 2014-08-17 17:36:53 -0700 | [diff] [blame] | 30 | compatibility-common-util-devicesidelib_v2 \ |
| 31 | cts-sensors-tests \ |
| 32 | ctstestrunner \ |
Raymond | 054a441 | 2015-03-17 20:51:23 -0700 | [diff] [blame] | 33 | apache-commons-math \ |
| 34 | androidplot \ |
Peng Xu | c14f012 | 2015-04-28 18:38:38 -0700 | [diff] [blame] | 35 | ctsverifier-opencv \ |
Robin Lee | b4be0a9 | 2015-06-15 19:13:00 -0700 | [diff] [blame] | 36 | core-tests \ |
Aravind Akella | dbc95c5 | 2015-06-09 10:22:16 -0700 | [diff] [blame] | 37 | android-support-v4 \ |
Robin Lee | b4be0a9 | 2015-06-15 19:13:00 -0700 | [diff] [blame] | 38 | mockito-target \ |
| 39 | mockwebserver \ |
Zoltan Szatmary-Ban | 01ce454 | 2015-06-22 11:14:47 +0100 | [diff] [blame] | 40 | compatibility-device-util_v2 \ |
destradaa | 65c7cdb | 2013-10-28 16:36:12 -0700 | [diff] [blame] | 41 | |
Brian Muramatsu | 70a9e3f | 2010-06-25 15:27:09 -0700 | [diff] [blame] | 42 | LOCAL_PACKAGE_NAME := CtsVerifier |
| 43 | |
Daniel Xie | 032fd6b | 2015-10-22 15:49:45 -0700 | [diff] [blame] | 44 | LOCAL_AAPT_FLAGS += --version-name "6.0_r1.5 $(BUILD_NUMBER)" |
leozwang | 2374020 | 2015-06-02 16:23:00 -0700 | [diff] [blame] | 45 | |
Ricardo Garcia | e908b09 | 2015-07-13 19:10:50 -0700 | [diff] [blame] | 46 | LOCAL_JNI_SHARED_LIBRARIES := libctsverifier_jni libaudioloopback_jni |
Brian Muramatsu | accc684 | 2010-08-11 18:57:27 -0700 | [diff] [blame] | 47 | |
Brian Muramatsu | 3076e74 | 2011-08-23 19:37:24 -0700 | [diff] [blame] | 48 | LOCAL_PROGUARD_FLAG_FILES := proguard.flags |
Brian Muramatsu | 70a9e3f | 2010-06-25 15:27:09 -0700 | [diff] [blame] | 49 | |
Nicholas Sauer | 6bc2a0e | 2014-07-16 23:04:19 -0700 | [diff] [blame] | 50 | LOCAL_SDK_VERSION := current |
Brian Muramatsu | 70a9e3f | 2010-06-25 15:27:09 -0700 | [diff] [blame] | 51 | |
Ying Wang | 2794106 | 2013-07-09 18:01:48 -0700 | [diff] [blame] | 52 | LOCAL_DEX_PREOPT := false |
| 53 | |
Brian Muramatsu | 70a9e3f | 2010-06-25 15:27:09 -0700 | [diff] [blame] | 54 | include $(BUILD_PACKAGE) |
| 55 | |
Peng Xu | c14f012 | 2015-04-28 18:38:38 -0700 | [diff] [blame] | 56 | |
| 57 | # opencv library |
| 58 | include $(CLEAR_VARS) |
| 59 | |
| 60 | LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := \ |
| 61 | ctsverifier-opencv:libs/opencv-android.jar |
| 62 | |
| 63 | include $(BUILD_MULTI_PREBUILT) |
| 64 | |
| 65 | |
Chris Wren | 7e1b81a | 2014-10-24 17:11:08 -0400 | [diff] [blame] | 66 | notification-bot := $(call intermediates-dir-for,APPS,NotificationBot)/package.apk |
Sudheer Shanka | 72ba56a | 2015-07-17 18:30:44 +0100 | [diff] [blame] | 67 | permission-app := $(call intermediates-dir-for,APPS,CtsPermissionApp)/package.apk |
Chris Wren | 7e1b81a | 2014-10-24 17:11:08 -0400 | [diff] [blame] | 68 | |
Brian Muramatsu | f65e620 | 2010-11-29 16:07:30 -0800 | [diff] [blame] | 69 | # Builds and launches CTS Verifier on a device. |
| 70 | .PHONY: cts-verifier |
Sudheer Shanka | 72ba56a | 2015-07-17 18:30:44 +0100 | [diff] [blame] | 71 | cts-verifier: CtsVerifier adb NotificationBot CtsPermissionApp |
destradaa | 9732fb1 | 2014-08-15 10:40:50 -0700 | [diff] [blame] | 72 | adb install -r $(PRODUCT_OUT)/data/app/CtsVerifier/CtsVerifier.apk \ |
Chris Wren | 7e1b81a | 2014-10-24 17:11:08 -0400 | [diff] [blame] | 73 | && adb install -r $(notification-bot) \ |
Sudheer Shanka | 72ba56a | 2015-07-17 18:30:44 +0100 | [diff] [blame] | 74 | && adb install -r $(permission-app) \ |
Brian Muramatsu | f65e620 | 2010-11-29 16:07:30 -0800 | [diff] [blame] | 75 | && adb shell "am start -n com.android.cts.verifier/.CtsVerifierActivity" |
| 76 | |
Brian Muramatsu | 2ddd805 | 2011-08-10 16:55:44 -0700 | [diff] [blame] | 77 | # |
| 78 | # Creates a "cts-verifier" directory that will contain: |
| 79 | # |
| 80 | # 1. Out directory with a "android-cts-verifier" containing the CTS Verifier |
| 81 | # and other binaries it needs. |
| 82 | # |
| 83 | # 2. Zipped version of the android-cts-verifier directory to be included with |
| 84 | # the build distribution. |
| 85 | # |
| 86 | cts-dir := $(HOST_OUT)/cts-verifier |
| 87 | verifier-dir-name := android-cts-verifier |
| 88 | verifier-dir := $(cts-dir)/$(verifier-dir-name) |
| 89 | verifier-zip-name := $(verifier-dir-name).zip |
| 90 | verifier-zip := $(cts-dir)/$(verifier-zip-name) |
| 91 | |
Dan Zhang | a867e12 | 2014-10-24 16:50:22 -0700 | [diff] [blame] | 92 | # turned off sensor power tests in initial L release |
| 93 | #$(PRODUCT_OUT)/data/app/CtsVerifier.apk $(verifier-zip): $(verifier-dir)/power/execute_power_tests.py |
| 94 | #$(PRODUCT_OUT)/data/app/CtsVerifier.apk $(verifier-zip): $(verifier-dir)/power/power_monitors/monsoon.py |
John Rusnak | ddf82c1 | 2014-08-04 15:49:51 -0700 | [diff] [blame] | 95 | |
destradaa | 69d7ee2 | 2014-08-21 09:29:10 -0700 | [diff] [blame] | 96 | # Copy the necessary host-side scripts to include in the zip file: |
Dan Zhang | a867e12 | 2014-10-24 16:50:22 -0700 | [diff] [blame] | 97 | #$(verifier-dir)/power/power_monitors/monsoon.py: cts/apps/CtsVerifier/assets/scripts/power_monitors/monsoon.py | $(ACP) |
| 98 | # $(hide) mkdir -p $(verifier-dir)/power/power_monitors |
| 99 | # $(hide) $(ACP) -fp cts/apps/CtsVerifier/assets/scripts/power_monitors/*.py $(verifier-dir)/power/power_monitors/. |
| 100 | # |
| 101 | #$(verifier-dir)/power/execute_power_tests.py: cts/apps/CtsVerifier/assets/scripts/execute_power_tests.py | $(ACP) |
| 102 | # $(hide) mkdir -p $(verifier-dir)/power |
| 103 | # $(hide) $(ACP) -fp cts/apps/CtsVerifier/assets/scripts/execute_power_tests.py $@ |
John Rusnak | ddf82c1 | 2014-08-04 15:49:51 -0700 | [diff] [blame] | 104 | |
Brian Muramatsu | 2ddd805 | 2011-08-10 16:55:44 -0700 | [diff] [blame] | 105 | cts : $(verifier-zip) |
Brian Muramatsu | 430a5ea | 2011-11-17 13:09:44 -0800 | [diff] [blame] | 106 | ifeq ($(HOST_OS),linux) |
| 107 | $(verifier-zip) : $(HOST_OUT)/bin/cts-usb-accessory |
| 108 | endif |
Ruben Brunk | 370e243 | 2014-10-14 18:33:23 -0700 | [diff] [blame] | 109 | $(verifier-zip) : $(HOST_OUT)/CameraITS |
Chris Wren | 7e1b81a | 2014-10-24 17:11:08 -0400 | [diff] [blame] | 110 | $(verifier-zip) : $(notification-bot) |
Sudheer Shanka | 72ba56a | 2015-07-17 18:30:44 +0100 | [diff] [blame] | 111 | $(verifier-zip) : $(permission-app) |
Brian Muramatsu | 430a5ea | 2011-11-17 13:09:44 -0800 | [diff] [blame] | 112 | $(verifier-zip) : $(call intermediates-dir-for,APPS,CtsVerifier)/package.apk | $(ACP) |
Brian Muramatsu | 2ddd805 | 2011-08-10 16:55:44 -0700 | [diff] [blame] | 113 | $(hide) mkdir -p $(verifier-dir) |
Brian Muramatsu | 430a5ea | 2011-11-17 13:09:44 -0800 | [diff] [blame] | 114 | $(hide) $(ACP) -fp $< $(verifier-dir)/CtsVerifier.apk |
Chris Wren | 7e1b81a | 2014-10-24 17:11:08 -0400 | [diff] [blame] | 115 | $(ACP) -fp $(notification-bot) $(verifier-dir)/NotificationBot.apk |
Sudheer Shanka | 72ba56a | 2015-07-17 18:30:44 +0100 | [diff] [blame] | 116 | $(ACP) -fp $(permission-app) $(verifier-dir)/CtsPermissionApp.apk |
Brian Muramatsu | 430a5ea | 2011-11-17 13:09:44 -0800 | [diff] [blame] | 117 | ifeq ($(HOST_OS),linux) |
Brian Muramatsu | dd2bf71 | 2011-08-12 12:46:07 -0700 | [diff] [blame] | 118 | $(hide) $(ACP) -fp $(HOST_OUT)/bin/cts-usb-accessory $(verifier-dir)/cts-usb-accessory |
Brian Muramatsu | 430a5ea | 2011-11-17 13:09:44 -0800 | [diff] [blame] | 119 | endif |
Ruben Brunk | 370e243 | 2014-10-14 18:33:23 -0700 | [diff] [blame] | 120 | $(hide) $(ACP) -fpr $(HOST_OUT)/CameraITS $(verifier-dir) |
Brian Muramatsu | 2ddd805 | 2011-08-10 16:55:44 -0700 | [diff] [blame] | 121 | $(hide) cd $(cts-dir) && zip -rq $(verifier-dir-name) $(verifier-dir-name) |
| 122 | |
| 123 | ifneq ($(filter cts, $(MAKECMDGOALS)),) |
| 124 | $(call dist-for-goals, cts, $(verifier-zip):$(verifier-zip-name)) |
| 125 | endif |
| 126 | |
Brian Muramatsu | 70a9e3f | 2010-06-25 15:27:09 -0700 | [diff] [blame] | 127 | include $(call all-makefiles-under,$(LOCAL_PATH)) |