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_llvm_and_toolchains", 19} 20 21android_test { 22 name: "CtsWrapWrapDebugMallocDebugTestCases", 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 // this is for the src files 34 "cts_tests_tests_wrap_src", 35 "wrap_debug_malloc_debug_lib", 36 ], 37 libs: [ 38 "android.test.runner.stubs", 39 "android.test.base.stubs", 40 "android.test.mock.stubs", 41 ], 42 test_suites: [ 43 "cts", 44 "general-tests", 45 ], 46 sdk_version: "current", 47 manifest: "AndroidManifest.xml", 48 // Jarjar to make WrapTest unique. 49 jarjar_rules: "jarjar-rules.txt", 50 use_embedded_native_libs: false, 51} 52 53java_genrule { 54 name: "wrap_debug_malloc_debug_lib", 55 srcs: ["wrap.sh"], 56 tools: ["soong_zip"], 57 out: ["wrap_debug_malloc_debug_abi.jar"], 58 cmd: "mkdir -p $(genDir)/lib/armeabi-v7a/ && " + 59 "mkdir -p $(genDir)/lib/arm64-v8a/ && " + 60 "mkdir -p $(genDir)/lib/x86/ && " + 61 "mkdir -p $(genDir)/lib/x86_64/ && " + 62 "cp $(in) $(genDir)/lib/armeabi-v7a/ && " + 63 "cp $(in) $(genDir)/lib/arm64-v8a/ && " + 64 "cp $(in) $(genDir)/lib/x86/ && " + 65 "cp $(in) $(genDir)/lib/x86_64/ && " + 66 "$(location soong_zip) -o $(out) -C $(genDir) " + 67 "-D $(genDir)/lib/armeabi-v7a/ -D $(genDir)/lib/arm64-v8a/ " + 68 "-D $(genDir)/lib/x86/ -D $(genDir)/lib/x86_64/", 69} 70