1# 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
17#
18# Reusable Sensor test classes and helpers
19#
20include $(CLEAR_VARS)
21
22LOCAL_MODULE := cts-sensors-tests
23
24LOCAL_MODULE_TAGS := tests
25
26LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
27
28LOCAL_STATIC_JAVA_LIBRARIES := compatibility-device-util
29
30LOCAL_JAVA_LIBRARIES := platform-test-annotations android.test.base.stubs
31
32LOCAL_SDK_VERSION := current
33
34LOCAL_SRC_FILES := $(call all-java-files-under, src)
35-include cts/error_prone_rules_tests.mk
36include $(BUILD_STATIC_JAVA_LIBRARY)
37
38#
39# JNI components for testing NDK
40#
41include $(CLEAR_VARS)
42
43LOCAL_MODULE := libcts-sensors-ndk-jni
44
45LOCAL_CFLAGS += -Werror -Wall -Wextra
46
47LOCAL_MODULE_TAGS := tests
48
49LOCAL_SRC_FILES := \
50    jni/SensorTest.cpp \
51    jni/SensorTestCases.cpp \
52    jni/android_hardware_cts_SensorDirectReportTest.cpp \
53    jni/android_hardware_cts_SensorNativeTest.cpp \
54    jni/nativeTestHelper.cpp
55
56LOCAL_C_INCLUDES := $(JNI_H_INCLUDE)
57
58LOCAL_SHARED_LIBRARIES := libandroid liblog
59
60LOCAL_SDK_VERSION := current
61
62LOCAL_NDK_STL_VARIANT := c++_shared
63-include cts/error_prone_rules_tests.mk
64include $(BUILD_SHARED_LIBRARY)
65
66#
67# CtsSensorTestCases package
68#
69include $(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
76LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
77
78# include both the 32 and 64 bit versions
79LOCAL_MULTILIB := both
80
81LOCAL_STATIC_JAVA_LIBRARIES := \
82    compatibility-device-util \
83    ctstestrunner \
84    cts-sensors-tests \
85
86LOCAL_JNI_SHARED_LIBRARIES := libcts-sensors-ndk-jni
87
88LOCAL_PACKAGE_NAME := CtsSensorTestCases
89
90LOCAL_SDK_VERSION := current
91
92LOCAL_JAVA_LIBRARIES := android.test.runner.stubs android.test.base.stubs
93
94LOCAL_NDK_STL_VARIANT := c++_shared
95
96include $(BUILD_CTS_PACKAGE)
97