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 \ |
destradaa | 65c7cdb | 2013-10-28 16:36:12 -0700 | [diff] [blame] | 33 | |
Brian Muramatsu | 70a9e3f | 2010-06-25 15:27:09 -0700 | [diff] [blame] | 34 | LOCAL_PACKAGE_NAME := CtsVerifier |
| 35 | |
Eino-Ville Talvala | 32b5cce | 2013-06-03 11:25:25 -0700 | [diff] [blame] | 36 | LOCAL_JNI_SHARED_LIBRARIES := libctsverifier_jni \ |
| 37 | #libcameraanalyzer # Needed for the disabled CameraAnalyzer tests |
Brian Muramatsu | accc684 | 2010-08-11 18:57:27 -0700 | [diff] [blame] | 38 | |
Brian Muramatsu | 3076e74 | 2011-08-23 19:37:24 -0700 | [diff] [blame] | 39 | LOCAL_PROGUARD_FLAG_FILES := proguard.flags |
Brian Muramatsu | 70a9e3f | 2010-06-25 15:27:09 -0700 | [diff] [blame] | 40 | |
Nicholas Sauer | 6bc2a0e | 2014-07-16 23:04:19 -0700 | [diff] [blame] | 41 | LOCAL_SDK_VERSION := current |
Brian Muramatsu | 70a9e3f | 2010-06-25 15:27:09 -0700 | [diff] [blame] | 42 | |
Ying Wang | 2794106 | 2013-07-09 18:01:48 -0700 | [diff] [blame] | 43 | LOCAL_DEX_PREOPT := false |
| 44 | |
Brian Muramatsu | 70a9e3f | 2010-06-25 15:27:09 -0700 | [diff] [blame] | 45 | include $(BUILD_PACKAGE) |
| 46 | |
Chris Wren | 7e1b81a | 2014-10-24 17:11:08 -0400 | [diff] [blame] | 47 | notification-bot := $(call intermediates-dir-for,APPS,NotificationBot)/package.apk |
| 48 | |
Brian Muramatsu | f65e620 | 2010-11-29 16:07:30 -0800 | [diff] [blame] | 49 | # Builds and launches CTS Verifier on a device. |
| 50 | .PHONY: cts-verifier |
Chris Wren | 7e1b81a | 2014-10-24 17:11:08 -0400 | [diff] [blame] | 51 | cts-verifier: CtsVerifier adb NotificationBot |
destradaa | 9732fb1 | 2014-08-15 10:40:50 -0700 | [diff] [blame] | 52 | adb install -r $(PRODUCT_OUT)/data/app/CtsVerifier/CtsVerifier.apk \ |
Chris Wren | 7e1b81a | 2014-10-24 17:11:08 -0400 | [diff] [blame] | 53 | && adb install -r $(notification-bot) \ |
Brian Muramatsu | f65e620 | 2010-11-29 16:07:30 -0800 | [diff] [blame] | 54 | && adb shell "am start -n com.android.cts.verifier/.CtsVerifierActivity" |
| 55 | |
Brian Muramatsu | 2ddd805 | 2011-08-10 16:55:44 -0700 | [diff] [blame] | 56 | # |
| 57 | # Creates a "cts-verifier" directory that will contain: |
| 58 | # |
| 59 | # 1. Out directory with a "android-cts-verifier" containing the CTS Verifier |
| 60 | # and other binaries it needs. |
| 61 | # |
| 62 | # 2. Zipped version of the android-cts-verifier directory to be included with |
| 63 | # the build distribution. |
| 64 | # |
| 65 | cts-dir := $(HOST_OUT)/cts-verifier |
| 66 | verifier-dir-name := android-cts-verifier |
| 67 | verifier-dir := $(cts-dir)/$(verifier-dir-name) |
| 68 | verifier-zip-name := $(verifier-dir-name).zip |
| 69 | verifier-zip := $(cts-dir)/$(verifier-zip-name) |
| 70 | |
Dan Zhang | a867e12 | 2014-10-24 16:50:22 -0700 | [diff] [blame] | 71 | # turned off sensor power tests in initial L release |
| 72 | #$(PRODUCT_OUT)/data/app/CtsVerifier.apk $(verifier-zip): $(verifier-dir)/power/execute_power_tests.py |
| 73 | #$(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] | 74 | |
destradaa | 69d7ee2 | 2014-08-21 09:29:10 -0700 | [diff] [blame] | 75 | # Copy the necessary host-side scripts to include in the zip file: |
Dan Zhang | a867e12 | 2014-10-24 16:50:22 -0700 | [diff] [blame] | 76 | #$(verifier-dir)/power/power_monitors/monsoon.py: cts/apps/CtsVerifier/assets/scripts/power_monitors/monsoon.py | $(ACP) |
| 77 | # $(hide) mkdir -p $(verifier-dir)/power/power_monitors |
| 78 | # $(hide) $(ACP) -fp cts/apps/CtsVerifier/assets/scripts/power_monitors/*.py $(verifier-dir)/power/power_monitors/. |
| 79 | # |
| 80 | #$(verifier-dir)/power/execute_power_tests.py: cts/apps/CtsVerifier/assets/scripts/execute_power_tests.py | $(ACP) |
| 81 | # $(hide) mkdir -p $(verifier-dir)/power |
| 82 | # $(hide) $(ACP) -fp cts/apps/CtsVerifier/assets/scripts/execute_power_tests.py $@ |
John Rusnak | ddf82c1 | 2014-08-04 15:49:51 -0700 | [diff] [blame] | 83 | |
Brian Muramatsu | 2ddd805 | 2011-08-10 16:55:44 -0700 | [diff] [blame] | 84 | cts : $(verifier-zip) |
Brian Muramatsu | 430a5ea | 2011-11-17 13:09:44 -0800 | [diff] [blame] | 85 | ifeq ($(HOST_OS),linux) |
| 86 | $(verifier-zip) : $(HOST_OUT)/bin/cts-usb-accessory |
| 87 | endif |
Ruben Brunk | 370e243 | 2014-10-14 18:33:23 -0700 | [diff] [blame] | 88 | $(verifier-zip) : $(HOST_OUT)/CameraITS |
Chris Wren | 7e1b81a | 2014-10-24 17:11:08 -0400 | [diff] [blame] | 89 | $(verifier-zip) : $(notification-bot) |
Brian Muramatsu | 430a5ea | 2011-11-17 13:09:44 -0800 | [diff] [blame] | 90 | $(verifier-zip) : $(call intermediates-dir-for,APPS,CtsVerifier)/package.apk | $(ACP) |
Brian Muramatsu | 2ddd805 | 2011-08-10 16:55:44 -0700 | [diff] [blame] | 91 | $(hide) mkdir -p $(verifier-dir) |
Brian Muramatsu | 430a5ea | 2011-11-17 13:09:44 -0800 | [diff] [blame] | 92 | $(hide) $(ACP) -fp $< $(verifier-dir)/CtsVerifier.apk |
Chris Wren | 7e1b81a | 2014-10-24 17:11:08 -0400 | [diff] [blame] | 93 | $(ACP) -fp $(notification-bot) $(verifier-dir)/NotificationBot.apk |
Brian Muramatsu | 430a5ea | 2011-11-17 13:09:44 -0800 | [diff] [blame] | 94 | ifeq ($(HOST_OS),linux) |
Brian Muramatsu | dd2bf71 | 2011-08-12 12:46:07 -0700 | [diff] [blame] | 95 | $(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] | 96 | endif |
Ruben Brunk | 370e243 | 2014-10-14 18:33:23 -0700 | [diff] [blame] | 97 | $(hide) $(ACP) -fpr $(HOST_OUT)/CameraITS $(verifier-dir) |
Brian Muramatsu | 2ddd805 | 2011-08-10 16:55:44 -0700 | [diff] [blame] | 98 | $(hide) cd $(cts-dir) && zip -rq $(verifier-dir-name) $(verifier-dir-name) |
| 99 | |
| 100 | ifneq ($(filter cts, $(MAKECMDGOALS)),) |
| 101 | $(call dist-for-goals, cts, $(verifier-zip):$(verifier-zip-name)) |
| 102 | endif |
| 103 | |
Brian Muramatsu | 70a9e3f | 2010-06-25 15:27:09 -0700 | [diff] [blame] | 104 | include $(call all-makefiles-under,$(LOCAL_PATH)) |