blob: ac4d0fbc3c522b45317cfdb98522859a8957ec77 [file] [log] [blame]
Brian Muramatsu70a9e3f2010-06-25 15:27:09 -07001#
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
17LOCAL_PATH:= $(call my-dir)
18include $(CLEAR_VARS)
19
20LOCAL_MODULE_TAGS := optional
21
22LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
23
Harsh Modife5933d2014-08-12 16:52:16 -070024LOCAL_SRC_FILES := $(call all-java-files-under, src) $(call all-Iaidl-files-under, src)
Brian Muramatsu70a9e3f2010-06-25 15:27:09 -070025
destradaa65c7cdb2013-10-28 16:36:12 -070026LOCAL_STATIC_JAVA_LIBRARIES := cts-sensors-tests
27
Brian Muramatsu70a9e3f2010-06-25 15:27:09 -070028LOCAL_PACKAGE_NAME := CtsVerifier
29
Eino-Ville Talvala32b5cce2013-06-03 11:25:25 -070030LOCAL_JNI_SHARED_LIBRARIES := libctsverifier_jni \
31 #libcameraanalyzer # Needed for the disabled CameraAnalyzer tests
Brian Muramatsuaccc6842010-08-11 18:57:27 -070032
Brian Muramatsu3076e742011-08-23 19:37:24 -070033LOCAL_PROGUARD_FLAG_FILES := proguard.flags
Brian Muramatsu70a9e3f2010-06-25 15:27:09 -070034
Nicholas Sauer6bc2a0e2014-07-16 23:04:19 -070035LOCAL_SDK_VERSION := current
Brian Muramatsu70a9e3f2010-06-25 15:27:09 -070036
Ying Wang27941062013-07-09 18:01:48 -070037LOCAL_DEX_PREOPT := false
38
Brian Muramatsu70a9e3f2010-06-25 15:27:09 -070039include $(BUILD_PACKAGE)
40
Brian Muramatsuf65e6202010-11-29 16:07:30 -080041# Builds and launches CTS Verifier on a device.
42.PHONY: cts-verifier
43cts-verifier: CtsVerifier adb
destradaa9732fb12014-08-15 10:40:50 -070044 adb install -r $(PRODUCT_OUT)/data/app/CtsVerifier/CtsVerifier.apk \
Brian Muramatsuf65e6202010-11-29 16:07:30 -080045 && adb shell "am start -n com.android.cts.verifier/.CtsVerifierActivity"
46
Brian Muramatsu2ddd8052011-08-10 16:55:44 -070047#
48# Creates a "cts-verifier" directory that will contain:
49#
50# 1. Out directory with a "android-cts-verifier" containing the CTS Verifier
51# and other binaries it needs.
52#
53# 2. Zipped version of the android-cts-verifier directory to be included with
54# the build distribution.
55#
56cts-dir := $(HOST_OUT)/cts-verifier
57verifier-dir-name := android-cts-verifier
58verifier-dir := $(cts-dir)/$(verifier-dir-name)
59verifier-zip-name := $(verifier-dir-name).zip
60verifier-zip := $(cts-dir)/$(verifier-zip-name)
61
62cts : $(verifier-zip)
Brian Muramatsu430a5ea2011-11-17 13:09:44 -080063ifeq ($(HOST_OS),linux)
64$(verifier-zip) : $(HOST_OUT)/bin/cts-usb-accessory
65endif
66$(verifier-zip) : $(call intermediates-dir-for,APPS,CtsVerifier)/package.apk | $(ACP)
Brian Muramatsu2ddd8052011-08-10 16:55:44 -070067 $(hide) mkdir -p $(verifier-dir)
Brian Muramatsu430a5ea2011-11-17 13:09:44 -080068 $(hide) $(ACP) -fp $< $(verifier-dir)/CtsVerifier.apk
69ifeq ($(HOST_OS),linux)
Brian Muramatsudd2bf712011-08-12 12:46:07 -070070 $(hide) $(ACP) -fp $(HOST_OUT)/bin/cts-usb-accessory $(verifier-dir)/cts-usb-accessory
Brian Muramatsu430a5ea2011-11-17 13:09:44 -080071endif
Brian Muramatsu2ddd8052011-08-10 16:55:44 -070072 $(hide) cd $(cts-dir) && zip -rq $(verifier-dir-name) $(verifier-dir-name)
73
74ifneq ($(filter cts, $(MAKECMDGOALS)),)
75 $(call dist-for-goals, cts, $(verifier-zip):$(verifier-zip-name))
76endif
77
Brian Muramatsu70a9e3f2010-06-25 15:27:09 -070078include $(call all-makefiles-under,$(LOCAL_PATH))