1// Copyright (C) 2024 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: ["frameworks_base_license"],
17    default_team: "trendy_team_android_kernel",
18}
19
20cc_library {
21    name: "libpunchtest",
22    stl: "none",
23    host_supported: true,
24    srcs: ["jni/android_test_jni_source.cpp"],
25    header_libs: ["jni_headers"],
26}
27
28android_test_helper_app {
29    name: "embedded_native_libs_test_app",
30    srcs: ["apk_embedded_native_libs/src/**/*.java"],
31    manifest: "apk_embedded_native_libs/embedded_native_libs_test_app.xml",
32    compile_multilib: "64",
33    jni_libs: [
34        "libpunchtest",
35    ],
36    static_libs: [
37        "androidx.test.rules",
38        "platform-test-annotations",
39    ],
40    use_embedded_native_libs: true,
41}
42
43android_test_helper_app {
44    name: "extract_native_libs_test_app",
45    srcs: ["apk_extract_native_libs/src/**/*.java"],
46    manifest: "apk_extract_native_libs/extract_native_libs_test_app.xml",
47    compile_multilib: "64",
48    jni_libs: [
49        "libpunchtest",
50    ],
51    static_libs: [
52        "androidx.test.rules",
53        "platform-test-annotations",
54    ],
55    use_embedded_native_libs: false,
56}
57
58java_test_host {
59    name: "FileSystemUtilsTests",
60    // Include all test java files
61    srcs: ["src/**/*.java"],
62    static_libs: [
63        "junit",
64        "platform-test-annotations",
65        "truth",
66    ],
67    libs: [
68        "tradefed",
69        "compatibility-host-util",
70        "compatibility-tradefed",
71    ],
72    data: [
73        ":embedded_native_libs_test_app",
74        ":extract_native_libs_test_app",
75    ],
76    test_suites: ["general-tests"],
77    test_config: "AndroidTest.xml",
78}
79