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
15//
16// Reusable Sensor test classes and helpers
17//
18package {
19    default_applicable_licenses: ["Android-Apache-2.0"],
20}
21
22java_library {
23    name: "cts-sensors-tests",
24    defaults: ["cts_error_prone_rules_tests"],
25
26    static_libs: ["compatibility-device-util-axt"],
27
28    libs: [
29        "platform-test-annotations",
30        "android.test.base.stubs",
31    ],
32
33    sdk_version: "test_current",
34
35    srcs: ["src/**/*.java"],
36}
37
38//
39// JNI components for testing NDK
40//
41cc_library_shared {
42    name: "libcts-sensors-ndk-jni",
43
44    cflags: [
45        "-Werror",
46        "-Wall",
47        "-Wextra",
48    ],
49
50    srcs: [
51        "jni/SensorTest.cpp",
52        "jni/SensorTestCases.cpp",
53        "jni/android_hardware_cts_SensorDirectReportTest.cpp",
54        "jni/android_hardware_cts_SensorNativeTest.cpp",
55        "jni/nativeTestHelper.cpp",
56    ],
57
58    header_libs: ["jni_headers"],
59
60    shared_libs: [
61        "libandroid",
62        "liblog",
63    ],
64
65    sdk_version: "current",
66
67    stl: "c++_shared",
68}
69
70//
71// CtsSensorTestCases package
72//
73android_test {
74    name: "CtsSensorTestCases",
75    defaults: [
76        "cts_defaults",
77    ],
78
79    // Tag this module as a cts test artifact
80    test_suites: [
81        "cts",
82        "general-tests",
83    ],
84
85    // include both the 32 and 64 bit versions
86    compile_multilib: "both",
87
88    static_libs: [
89        "compatibility-device-util-axt",
90        "ctstestrunner-axt",
91        "cts-sensors-tests",
92    ],
93
94    jni_libs: ["libcts-sensors-ndk-jni"],
95
96    sdk_version: "test_current",
97
98    libs: [
99        "android.test.runner.stubs",
100        "android.test.base.stubs",
101    ],
102
103    stl: "c++_shared",
104}
105