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 20android_test { 21 name: "HealthFitnessUnitTests", 22 min_sdk_version: "34", 23 sdk_version: "module_current", 24 manifest: "AndroidManifest.xml", 25 test_config: "AndroidTest.xml", 26 srcs: [ 27 "src/**/*.java", 28 ], 29 test_suites: [ 30 "mts-healthfitness", 31 "general-tests", 32 ], 33 defaults: [ 34 "mts-target-sdk-version-current", 35 "modules-utils-testable-device-config-defaults", 36 ], 37 // This needs to be added to the unit tests as this build change is guarded by a build system 38 // flag (soong_config_bool_variable "phr_fhir_validation"), which is part of the PHR FHIR 39 // structural validation feature. 40 java_resources: [ 41 ":generate-fhir-spec-r4-binarypb", 42 ], 43 static_libs: [ 44 "TestParameterInjector", 45 "service-healthfitness.impl", 46 "framework-healthfitness.impl", 47 "healthfitness-aconfig-flags-lib", 48 "healthfitness-aconfig-flags-helper", 49 "flag-junit", 50 "androidx.test.runner", 51 "mockito-target-extended-minus-junit4", 52 "truth", 53 "services.core", 54 "androidx.test.ext.truth", 55 "cts-healthconnect-utils", 56 "cts-healthconnect-phr-lib", 57 "flag-junit", 58 "platform-parametric-runner-lib", 59 "framework-annotations-lib", 60 ], 61 jni_libs: [ 62 // Required for ExtendedMockito 63 "libdexmakerjvmtiagent", 64 "libstaticjvmtiagent", 65 ], 66 libs: [ 67 "android.test.base.stubs.system", 68 "android.test.mock.stubs.system", 69 "android.test.runner.stubs.system", 70 "framework-sdkextensions.stubs.module_lib", 71 "framework-configinfrastructure.stubs.module_lib", 72 ], 73 // Test coverage system runs on different devices. Need to 74 // compile for all architecture. 75 compile_multilib: "both", 76} 77