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: [ 27 "compatibility-device-util-axt", 28 "cts-input-lib", 29 ], 30 31 libs: [ 32 "platform-test-annotations", 33 "android.test.base.stubs", 34 ], 35 36 sdk_version: "test_current", 37 38 srcs: [ 39 "src/**/*.java", 40 "src/**/*.kt", 41 ], 42 exclude_srcs: [ 43 // Depends on resources, so can't be included in a java_library - we add 44 // this file explicitly to CtsSensorTestCases, which is the only place 45 // it's actually needed 46 "src/android/hardware/cts/SensorHeadTrackerTest.java", 47 ], 48} 49 50// 51// JNI components for testing NDK 52// 53cc_library_shared { 54 name: "libcts-sensors-ndk-jni", 55 56 cflags: [ 57 "-Werror", 58 "-Wall", 59 "-Wextra", 60 ], 61 62 srcs: [ 63 "jni/SensorTest.cpp", 64 "jni/SensorTestCases.cpp", 65 "jni/android_hardware_cts_SensorDirectReportTest.cpp", 66 "jni/android_hardware_cts_SensorNativeTest.cpp", 67 "jni/nativeTestHelper.cpp", 68 ], 69 70 header_libs: ["jni_headers"], 71 72 shared_libs: [ 73 "libandroid", 74 "liblog", 75 ], 76 77 sdk_version: "current", 78 79 stl: "c++_shared", 80} 81 82// 83// CtsSensorTestCases package 84// 85android_test { 86 name: "CtsSensorTestCases", 87 defaults: [ 88 "cts_defaults", 89 ], 90 91 // Tag this module as a cts test artifact 92 test_suites: [ 93 "cts", 94 "general-tests", 95 ], 96 97 // include both the 32 and 64 bit versions 98 compile_multilib: "both", 99 100 static_libs: [ 101 "compatibility-device-util-axt", 102 "ctstestrunner-axt", 103 "cts-sensors-tests", 104 ], 105 106 jni_libs: ["libcts-sensors-ndk-jni"], 107 108 sdk_version: "test_current", 109 110 libs: [ 111 "android.test.runner.stubs", 112 "android.test.base.stubs", 113 ], 114 115 srcs: [ 116 "src/android/hardware/cts/SensorHeadTrackerTest.java", 117 ], 118 119 stl: "c++_shared", 120} 121