1// Copyright (C) 2022 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 15package { 16 default_applicable_licenses: ["Android-Apache-2.0"], 17 default_team: "trendy_team_android_health", 18} 19 20// Tests that require the test SDK to run. 21android_test { 22 name: "HealthFitnessTestSdkUnitTests", 23 min_sdk_version: "34", 24 sdk_version: "test_current", 25 manifest: "AndroidManifest.xml", 26 test_config: "AndroidTest_testSdk.xml", 27 srcs: [ 28 "src/com/android/server/healthconnect/storage/datatypehelpers/AppOpLogsHelperTest.java", 29 ], 30 test_suites: [ 31 "mts-healthfitness", 32 "general-tests", 33 ], 34 defaults: [ 35 "mts-target-sdk-version-current", 36 "modules-utils-testable-device-config-defaults", 37 ], 38 static_libs: [ 39 "service-healthfitness.impl", 40 "framework-healthfitness.impl", 41 "flag-junit", 42 "androidx.test.ext.junit", 43 "androidx.test.runner", 44 "mockito-target-extended-minus-junit4", 45 "truth", 46 "services.core", 47 "androidx.test.ext.truth", 48 "framework-annotations-lib", 49 "android.permission.flags-aconfig-java-export", 50 ], 51 jni_libs: [ 52 // Required for ExtendedMockito 53 "libdexmakerjvmtiagent", 54 "libstaticjvmtiagent", 55 ], 56 libs: [ 57 "android.test.base.stubs.system", 58 "android.test.mock.stubs.system", 59 "android.test.runner.stubs.system", 60 "framework-sdkextensions.stubs.module_lib", 61 "framework-configinfrastructure.stubs.module_lib", 62 ], 63 // Test coverage system runs on different devices. Need to 64 // compile for all architecture. 65 compile_multilib: "both", 66} 67 68android_test { 69 name: "HealthFitnessUnitTests", 70 min_sdk_version: "34", 71 sdk_version: "module_current", 72 manifest: "AndroidManifest.xml", 73 test_config: "AndroidTest.xml", 74 srcs: [ 75 "src/**/*.java", 76 ], 77 exclude_srcs: [ 78 "src/com/android/server/healthconnect/storage/datatypehelpers/AppOpLogsHelperTest.java", 79 ], 80 test_suites: [ 81 "mts-healthfitness", 82 "general-tests", 83 ], 84 defaults: [ 85 "mts-target-sdk-version-current", 86 "modules-utils-testable-device-config-defaults", 87 ], 88 // This needs to be added to the unit tests as this build change is guarded by a build system 89 // flag (soong_config_bool_variable "phr_fhir_validation"), which is part of the PHR FHIR 90 // structural validation feature. 91 java_resources: [ 92 ":generate-fhir-spec-r4-binarypb", 93 ], 94 static_libs: [ 95 "TestParameterInjector", 96 "service-healthfitness.impl", 97 "framework-healthfitness.impl", 98 "healthfitness-aconfig-flags-lib", 99 "healthfitness-aconfig-flags-helper", 100 "flag-junit", 101 "androidx.test.runner", 102 "mockito-target-extended-minus-junit4", 103 "truth", 104 "services.core", 105 "androidx.test.ext.truth", 106 "cts-healthconnect-utils", 107 "cts-healthconnect-phr-lib", 108 "platform-parametric-runner-lib", 109 "framework-annotations-lib", 110 ], 111 jni_libs: [ 112 // Required for ExtendedMockito 113 "libdexmakerjvmtiagent", 114 "libstaticjvmtiagent", 115 ], 116 libs: [ 117 "android.test.base.stubs.system", 118 "android.test.mock.stubs.system", 119 "android.test.runner.stubs.system", 120 "framework-sdkextensions.stubs.module_lib", 121 "framework-configinfrastructure.stubs.module_lib", 122 ], 123 // Test coverage system runs on different devices. Need to 124 // compile for all architecture. 125 compile_multilib: "both", 126} 127