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 | |
| 24 | LOCAL_SRC_FILES := $(call all-java-files-under, src) |
| 25 | |
| 26 | LOCAL_PACKAGE_NAME := CtsVerifier |
| 27 | |
Eino-Ville Talvala | 32b5cce | 2013-06-03 11:25:25 -0700 | [diff] [blame] | 28 | LOCAL_JNI_SHARED_LIBRARIES := libctsverifier_jni \ |
| 29 | #libcameraanalyzer # Needed for the disabled CameraAnalyzer tests |
Brian Muramatsu | accc684 | 2010-08-11 18:57:27 -0700 | [diff] [blame] | 30 | |
Brian Muramatsu | 3076e74 | 2011-08-23 19:37:24 -0700 | [diff] [blame] | 31 | LOCAL_PROGUARD_FLAG_FILES := proguard.flags |
Brian Muramatsu | 70a9e3f | 2010-06-25 15:27:09 -0700 | [diff] [blame] | 32 | |
| 33 | LOCAL_SDK_VERSION := current |
| 34 | |
Ying Wang | 2794106 | 2013-07-09 18:01:48 -0700 | [diff] [blame] | 35 | LOCAL_DEX_PREOPT := false |
| 36 | |
Brian Muramatsu | 70a9e3f | 2010-06-25 15:27:09 -0700 | [diff] [blame] | 37 | include $(BUILD_PACKAGE) |
| 38 | |
Brian Muramatsu | f65e620 | 2010-11-29 16:07:30 -0800 | [diff] [blame] | 39 | # Builds and launches CTS Verifier on a device. |
| 40 | .PHONY: cts-verifier |
| 41 | cts-verifier: CtsVerifier adb |
Ying Wang | 57aa58f | 2012-12-04 11:35:41 -0800 | [diff] [blame] | 42 | adb install -r $(PRODUCT_OUT)/data/app/CtsVerifier.apk \ |
Brian Muramatsu | f65e620 | 2010-11-29 16:07:30 -0800 | [diff] [blame] | 43 | && adb shell "am start -n com.android.cts.verifier/.CtsVerifierActivity" |
| 44 | |
Brian Muramatsu | 2ddd805 | 2011-08-10 16:55:44 -0700 | [diff] [blame] | 45 | # |
| 46 | # Creates a "cts-verifier" directory that will contain: |
| 47 | # |
| 48 | # 1. Out directory with a "android-cts-verifier" containing the CTS Verifier |
| 49 | # and other binaries it needs. |
| 50 | # |
| 51 | # 2. Zipped version of the android-cts-verifier directory to be included with |
| 52 | # the build distribution. |
| 53 | # |
| 54 | cts-dir := $(HOST_OUT)/cts-verifier |
| 55 | verifier-dir-name := android-cts-verifier |
| 56 | verifier-dir := $(cts-dir)/$(verifier-dir-name) |
| 57 | verifier-zip-name := $(verifier-dir-name).zip |
| 58 | verifier-zip := $(cts-dir)/$(verifier-zip-name) |
| 59 | |
| 60 | cts : $(verifier-zip) |
Brian Muramatsu | 430a5ea | 2011-11-17 13:09:44 -0800 | [diff] [blame] | 61 | ifeq ($(HOST_OS),linux) |
| 62 | $(verifier-zip) : $(HOST_OUT)/bin/cts-usb-accessory |
| 63 | endif |
| 64 | $(verifier-zip) : $(call intermediates-dir-for,APPS,CtsVerifier)/package.apk | $(ACP) |
Brian Muramatsu | 2ddd805 | 2011-08-10 16:55:44 -0700 | [diff] [blame] | 65 | $(hide) mkdir -p $(verifier-dir) |
Brian Muramatsu | 430a5ea | 2011-11-17 13:09:44 -0800 | [diff] [blame] | 66 | $(hide) $(ACP) -fp $< $(verifier-dir)/CtsVerifier.apk |
| 67 | ifeq ($(HOST_OS),linux) |
Brian Muramatsu | dd2bf71 | 2011-08-12 12:46:07 -0700 | [diff] [blame] | 68 | $(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] | 69 | endif |
Brian Muramatsu | 2ddd805 | 2011-08-10 16:55:44 -0700 | [diff] [blame] | 70 | $(hide) cd $(cts-dir) && zip -rq $(verifier-dir-name) $(verifier-dir-name) |
| 71 | |
| 72 | ifneq ($(filter cts, $(MAKECMDGOALS)),) |
| 73 | $(call dist-for-goals, cts, $(verifier-zip):$(verifier-zip-name)) |
| 74 | endif |
| 75 | |
Brian Muramatsu | 70a9e3f | 2010-06-25 15:27:09 -0700 | [diff] [blame] | 76 | include $(call all-makefiles-under,$(LOCAL_PATH)) |