xref: /aosp_15_r20/cts/tests/tests/wrap/wrap_debug/Android.bp (revision b7c941bb3fa97aba169d73cee0bed2de8ac964bf)
1// Copyright (C) 2017 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    // See: http://go/android-license-faq
17    default_applicable_licenses: ["Android-Apache-2.0"],
18    default_team: "trendy_team_native_tools_libraries",
19}
20
21android_test {
22    name: "CtsWrapWrapDebugTestCases",
23    compile_multilib: "both",
24    dex_preopt: {
25        enabled: false,
26    },
27    optimize: {
28        enabled: false,
29    },
30    static_libs: [
31        "compatibility-device-util-axt",
32        "androidx.test.rules",
33        "wrap_debug_lib",
34        "cts_tests_tests_wrap_src",
35    ],
36    libs: [
37        "android.test.runner.stubs",
38        "android.test.base.stubs",
39    ],
40    test_suites: [
41        "cts",
42        "general-tests",
43    ],
44    sdk_version: "current",
45    manifest: "AndroidManifest.xml",
46    // Jarjar to make WrapTest unique.
47    jarjar_rules: "jarjar-rules.txt",
48    use_embedded_native_libs: false,
49}
50
51java_genrule {
52    name: "wrap_debug_lib",
53    srcs: [":wrap.sh"],
54    tools: ["soong_zip"],
55    out: ["wrap_debug_abi.jar"],
56    cmd: "mkdir -p $(genDir)/lib/armeabi-v7a/ && " +
57         "mkdir -p $(genDir)/lib/arm64-v8a/ && " +
58         "mkdir -p $(genDir)/lib/x86/ && " +
59         "mkdir -p $(genDir)/lib/x86_64/ && " +
60         "cp $(in) $(genDir)/lib/armeabi-v7a/ && " +
61         "cp $(in) $(genDir)/lib/arm64-v8a/ && " +
62         "cp $(in) $(genDir)/lib/x86/ && " +
63         "cp $(in) $(genDir)/lib/x86_64/ && " +
64         "$(location soong_zip) -o $(out) -C $(genDir) " +
65         "-D $(genDir)/lib/armeabi-v7a/ -D $(genDir)/lib/arm64-v8a/ " +
66         "-D $(genDir)/lib/x86/ -D $(genDir)/lib/x86_64/",
67}
68