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}
18
19android_test {
20    name: "HealthFitnessIntegrationBackupRestoreTests",
21    team: "trendy_team_android_health",
22    test_suites: [
23        "device-tests",
24        "general-tests",
25        "mts-healthfitness",
26    ],
27
28    libs: [
29        "android.test.runner.stubs.system",
30        "android.test.base.stubs.system",
31        "framework-configinfrastructure.stubs.module_lib",
32        "framework-sdkextensions.stubs.module_lib",
33        "framework-healthfitness.impl",
34    ],
35
36    static_libs: [
37        "androidx.test.rules",
38        "compatibility-device-util-axt",
39        "androidx.test.ext.truth",
40        "cts-healthconnect-utils",
41        "cts-healthconnect-phr-lib",
42    ],
43    srcs: [
44        "src/android/healthconnect/tests/backuprestore/*.java",
45    ],
46    min_sdk_version: "34",
47    target_sdk_version: "34",
48    sdk_version: "module_current",
49    test_config: "AndroidTestBackupRestore.xml",
50    manifest: "AndroidManifestBackupRestore.xml",
51    resource_dirs: ["res"],
52    data: [
53        ":HealthFitnessCtsTestApp",
54        ":HealthFitnessCtsTestApp2",
55    ],
56}
57
58android_test {
59    name: "HealthFitnessIntegrationTests",
60    team: "trendy_team_android_health",
61    test_suites: [
62        "device-tests",
63        "general-tests",
64        "mts-healthfitness",
65    ],
66    libs: [
67        "framework-healthfitness.impl",
68    ],
69
70    static_libs: [
71        "androidx.test.rules",
72        "compatibility-device-util-axt",
73        "androidx.test.ext.truth",
74        "cts-healthconnect-utils",
75    ],
76
77    srcs: [
78        ":healthfitness-permissions-testapp-srcs",
79        "src/**/*.java",
80    ],
81    exclude_srcs: [
82        "src/android/healthconnect/tests/backuprestore/*.java",
83        "src/android/healthconnect/tests/exportimport/*.java",
84    ],
85    min_sdk_version: "34",
86    target_sdk_version: "34",
87    sdk_version: "module_current",
88    data: [
89        ":HealthFitnessPermsTestApp",
90        ":HCPermsTestAppNoUsageIntent",
91        ":HCSharedUserPermsTestApp",
92    ],
93}
94
95android_test {
96    name: "HealthFitnessIntegrationExportImportTests",
97    team: "trendy_team_android_health",
98    test_suites: [
99        "device-tests",
100        "general-tests",
101        "mts-healthfitness",
102    ],
103    libs: [
104        "framework-healthfitness.impl",
105    ],
106    static_libs: [
107        // TODO(b/318484678): Remove this dependency.
108        "service-healthfitness.impl",
109        "androidx.test.rules",
110        "compatibility-device-util-axt",
111        "androidx.test.ext.truth",
112        "cts-healthconnect-utils",
113        "healthconnect-documentprovider-utils",
114        "healthfitness-exported-aconfig-flags-lib",
115    ],
116    srcs: [
117        "src/android/healthconnect/tests/exportimport/*.java",
118    ],
119    min_sdk_version: "34",
120    sdk_version: "module_current",
121    target_sdk_version: "34",
122    test_config: "AndroidTestExportImport.xml",
123    manifest: "AndroidManifestExportImport.xml",
124    data: [
125        ":HealthFitnessCtsTestApp",
126        ":HealthFitnessTestDocumentProviderApp",
127        ":HealthFitnessTestDocumentProviderApp2",
128    ],
129}
130