blob: e636af8cb9e17790dde95c2b821e9b81c1ae14ca [file] [log] [blame]
Peng Xu1bd2c9b2016-08-31 13:26:19 -07001# Copyright (C) 2016 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15LOCAL_PATH:= $(call my-dir)
16
Peng Xu19a6b342017-02-16 20:30:26 -080017#
Peng Xu1bd2c9b2016-08-31 13:26:19 -070018# Reusable Sensor test classes and helpers
Peng Xu19a6b342017-02-16 20:30:26 -080019#
Peng Xu1bd2c9b2016-08-31 13:26:19 -070020include $(CLEAR_VARS)
21
22LOCAL_MODULE := cts-sensors-tests
23
24LOCAL_MODULE_TAGS := tests
25
26LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
27
Aaron Holdenaf1e4662017-04-26 10:17:48 -070028LOCAL_STATIC_JAVA_LIBRARIES := compatibility-device-util
Peng Xu1bd2c9b2016-08-31 13:26:19 -070029
Paul Duffinb7a13292017-12-15 07:27:19 +000030LOCAL_JAVA_LIBRARIES := platform-test-annotations android.test.base.stubs
Peng Xu1bd2c9b2016-08-31 13:26:19 -070031
32LOCAL_SDK_VERSION := current
33
34LOCAL_SRC_FILES := $(call all-java-files-under, src)
jdesprezf99bcd02017-05-03 12:39:11 -070035-include cts/error_prone_rules_tests.mk
Peng Xu1bd2c9b2016-08-31 13:26:19 -070036include $(BUILD_STATIC_JAVA_LIBRARY)
37
Peng Xu19a6b342017-02-16 20:30:26 -080038#
39# JNI components for testing NDK
40#
41include $(CLEAR_VARS)
Peng Xu1bd2c9b2016-08-31 13:26:19 -070042
Peng Xu19a6b342017-02-16 20:30:26 -080043LOCAL_MODULE := libcts-sensors-ndk-jni
44
45LOCAL_CFLAGS += -Werror -Wall -Wextra
46
47LOCAL_MODULE_TAGS := tests
48
49LOCAL_SRC_FILES := \
50 jni/SensorTest.cpp \
Peng Xuf47b7ed2017-02-28 20:36:00 -080051 jni/SensorTestCases.cpp \
Peng Xua6088df2017-03-05 01:46:54 -080052 jni/android_hardware_cts_SensorDirectReportTest.cpp \
53 jni/android_hardware_cts_SensorNativeTest.cpp \
Peng Xuf47b7ed2017-02-28 20:36:00 -080054 jni/nativeTestHelper.cpp
Peng Xu19a6b342017-02-16 20:30:26 -080055
56LOCAL_C_INCLUDES := $(JNI_H_INCLUDE)
57
58LOCAL_SHARED_LIBRARIES := libandroid liblog
59
60LOCAL_SDK_VERSION := current
61
62LOCAL_NDK_STL_VARIANT := c++_shared
jdesprez6b119e52017-05-04 15:30:11 -070063-include cts/error_prone_rules_tests.mk
Peng Xu19a6b342017-02-16 20:30:26 -080064include $(BUILD_SHARED_LIBRARY)
65
66#
Peng Xu1bd2c9b2016-08-31 13:26:19 -070067# CtsSensorTestCases package
Peng Xu19a6b342017-02-16 20:30:26 -080068#
Peng Xu1bd2c9b2016-08-31 13:26:19 -070069include $(CLEAR_VARS)
70
71LOCAL_MODULE_TAGS := tests
72
73LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
74
75# Tag this module as a cts test artifact
nickrosef1efbc62017-07-05 12:38:06 -070076LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
Peng Xu1bd2c9b2016-08-31 13:26:19 -070077
Julien Desprez7d03fb42017-03-07 16:30:28 +000078# include both the 32 and 64 bit versions
79LOCAL_MULTILIB := both
80
Peng Xu1bd2c9b2016-08-31 13:26:19 -070081LOCAL_STATIC_JAVA_LIBRARIES := \
Aaron Holdenaf1e4662017-04-26 10:17:48 -070082 compatibility-device-util \
Peng Xu1bd2c9b2016-08-31 13:26:19 -070083 ctstestrunner \
84 cts-sensors-tests \
85
Peng Xu19a6b342017-02-16 20:30:26 -080086LOCAL_JNI_SHARED_LIBRARIES := libcts-sensors-ndk-jni
87
Peng Xu1bd2c9b2016-08-31 13:26:19 -070088LOCAL_PACKAGE_NAME := CtsSensorTestCases
89
90LOCAL_SDK_VERSION := current
Peng Xu19a6b342017-02-16 20:30:26 -080091
Paul Duffinb7a13292017-12-15 07:27:19 +000092LOCAL_JAVA_LIBRARIES := android.test.runner.stubs android.test.base.stubs
Peng Xu1bd2c9b2016-08-31 13:26:19 -070093
Peng Xu19a6b342017-02-16 20:30:26 -080094LOCAL_NDK_STL_VARIANT := c++_shared
95
Peng Xu1bd2c9b2016-08-31 13:26:19 -070096include $(BUILD_CTS_PACKAGE)