Convert Android.mk to Android.bp
1. Converted the wrap_debug/Android.mk to an Android.bp file;
2. Converted the wrap_nodebug/Android.mk to an Android.bp file.
Bug: 190635892
Test: compared the apk files built by Make and Soong
Test: TreeHugger
Change-Id: Ie586571138c2d9388ab812ff58199bc22bd465dc
diff --git a/tests/tests/wrap/Android.bp b/tests/tests/wrap/Android.bp
index 27ffc21..a94a5db0 100644
--- a/tests/tests/wrap/Android.bp
+++ b/tests/tests/wrap/Android.bp
@@ -25,3 +25,11 @@
"android.test.base.stubs",
],
}
+
+filegroup {
+ name: "wrap.sh",
+ srcs: [
+ "wrap.sh",
+ ],
+ path: ".",
+}
diff --git a/tests/tests/wrap/wrap_debug/Android.bp b/tests/tests/wrap/wrap_debug/Android.bp
new file mode 100644
index 0000000..5f50d5e
--- /dev/null
+++ b/tests/tests/wrap/wrap_debug/Android.bp
@@ -0,0 +1,66 @@
+// Copyright (C) 2017 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package {
+ // See: http://go/android-license-faq
+ default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
+android_test {
+ name: "CtsWrapWrapDebugTestCases",
+ compile_multilib: "both",
+ dex_preopt: {
+ enabled: false,
+ },
+ optimize: {
+ enabled: false,
+ },
+ static_libs: [
+ "compatibility-device-util-axt",
+ "androidx.test.rules",
+ "wrap_debug_lib"
+ ],
+ libs: [
+ "android.test.runner.stubs",
+ "android.test.base.stubs",
+ ],
+ srcs: [":cts_tests_tests_wrap_src"],
+ test_suites: [
+ "cts",
+ "general-tests",
+ ],
+ sdk_version: "current",
+ manifest: "AndroidManifest.xml",
+ // Jarjar to make WrapTest unique.
+ jarjar_rules: "jarjar-rules.txt",
+ use_embedded_native_libs: false,
+}
+
+java_genrule {
+ name: "wrap_debug_lib",
+ srcs: [":wrap.sh"],
+ tools: ["soong_zip"],
+ out: ["wrap_debug_abi.jar"],
+ cmd: "mkdir -p $(genDir)/lib/armeabi-v7a/ && " +
+ "mkdir -p $(genDir)/lib/arm64-v8a/ && " +
+ "mkdir -p $(genDir)/lib/x86/ && " +
+ "mkdir -p $(genDir)/lib/x86_64/ && " +
+ "cp $(in) $(genDir)/lib/armeabi-v7a/ && " +
+ "cp $(in) $(genDir)/lib/arm64-v8a/ && " +
+ "cp $(in) $(genDir)/lib/x86/ && " +
+ "cp $(in) $(genDir)/lib/x86_64/ && " +
+ "$(location soong_zip) -o $(out) -C $(genDir) " +
+ "-D $(genDir)/lib/armeabi-v7a/ -D $(genDir)/lib/arm64-v8a/ " +
+ "-D $(genDir)/lib/x86/ -D $(genDir)/lib/x86_64/",
+}
diff --git a/tests/tests/wrap/wrap_debug/Android.mk b/tests/tests/wrap/wrap_debug/Android.mk
deleted file mode 100644
index 8743cc4..0000000
--- a/tests/tests/wrap/wrap_debug/Android.mk
+++ /dev/null
@@ -1,51 +0,0 @@
-# Copyright (C) 2017 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_MULTILIB := both
-LOCAL_MODULE_TAGS := tests
-LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
-LOCAL_DEX_PREOPT := false
-LOCAL_PROGUARD_ENABLED := disabled
-LOCAL_STATIC_JAVA_LIBRARIES := \
- compatibility-device-util-axt \
- androidx.test.rules
-LOCAL_JAVA_LIBRARIES := android.test.runner.stubs android.test.base.stubs
-LOCAL_SRC_FILES := $(call all-java-files-under, ../src)
-LOCAL_COMPATIBILITY_SUITE := cts general-tests
-LOCAL_SDK_VERSION := current
-
-LOCAL_PREBUILT_JNI_LIBS_arm := ../wrap.sh
-LOCAL_PREBUILT_JNI_LIBS_arm64 := ../wrap.sh
-LOCAL_PREBUILT_JNI_LIBS_mips := ../wrap.sh
-LOCAL_PREBUILT_JNI_LIBS_mips64 := ../wrap.sh
-LOCAL_PREBUILT_JNI_LIBS_x86 := ../wrap.sh
-LOCAL_PREBUILT_JNI_LIBS_x86_64 := ../wrap.sh
-
-LOCAL_PACKAGE_NAME := CtsWrapWrapDebugTestCases
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
-LOCAL_LICENSE_CONDITIONS := notice
-LOCAL_MANIFEST_FILE := AndroidManifest.xml
-
-# Jarjar to make WrapTest unique.
-LOCAL_JARJAR_RULES := $(LOCAL_PATH)/jarjar-rules.txt
-
-LOCAL_USE_EMBEDDED_NATIVE_LIBS := false
-
-include $(BUILD_PACKAGE)
-
-include $(CLEAR_VARS)
diff --git a/tests/tests/wrap/wrap_nodebug/Android.bp b/tests/tests/wrap/wrap_nodebug/Android.bp
new file mode 100644
index 0000000..34f0a5c
--- /dev/null
+++ b/tests/tests/wrap/wrap_nodebug/Android.bp
@@ -0,0 +1,48 @@
+// Copyright (C) 2017 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package {
+ // See: http://go/android-license-faq
+ default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
+android_test {
+ name: "CtsWrapWrapNoDebugTestCases",
+ compile_multilib: "both",
+ dex_preopt: {
+ enabled: false,
+ },
+ optimize: {
+ enabled: false,
+ },
+ static_libs: [
+ "compatibility-device-util-axt",
+ "androidx.test.rules",
+ "wrap_debug_lib"
+ ],
+ libs: [
+ "android.test.runner.stubs",
+ "android.test.base.stubs",
+ ],
+ srcs: [":cts_tests_tests_wrap_src"],
+ test_suites: [
+ "cts",
+ "general-tests",
+ ],
+ sdk_version: "current",
+ manifest: "AndroidManifest.xml",
+ // Jarjar to make WrapTest unique.
+ jarjar_rules: "jarjar-rules.txt",
+ use_embedded_native_libs: false,
+}
diff --git a/tests/tests/wrap/wrap_nodebug/Android.mk b/tests/tests/wrap/wrap_nodebug/Android.mk
deleted file mode 100644
index f7823c5..0000000
--- a/tests/tests/wrap/wrap_nodebug/Android.mk
+++ /dev/null
@@ -1,51 +0,0 @@
-# Copyright (C) 2017 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_MULTILIB := both
-LOCAL_MODULE_TAGS := tests
-LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
-LOCAL_DEX_PREOPT := false
-LOCAL_PROGUARD_ENABLED := disabled
-LOCAL_STATIC_JAVA_LIBRARIES := \
- compatibility-device-util-axt \
- androidx.test.rules
-LOCAL_JAVA_LIBRARIES := android.test.runner.stubs android.test.base.stubs
-LOCAL_SRC_FILES := $(call all-java-files-under, ../src)
-LOCAL_COMPATIBILITY_SUITE := cts general-tests
-LOCAL_SDK_VERSION := current
-
-LOCAL_PREBUILT_JNI_LIBS_arm := ../wrap.sh
-LOCAL_PREBUILT_JNI_LIBS_arm64 := ../wrap.sh
-LOCAL_PREBUILT_JNI_LIBS_mips := ../wrap.sh
-LOCAL_PREBUILT_JNI_LIBS_mips64 := ../wrap.sh
-LOCAL_PREBUILT_JNI_LIBS_x86 := ../wrap.sh
-LOCAL_PREBUILT_JNI_LIBS_x86_64 := ../wrap.sh
-
-LOCAL_PACKAGE_NAME := CtsWrapWrapNoDebugTestCases
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
-LOCAL_LICENSE_CONDITIONS := notice
-LOCAL_MANIFEST_FILE := AndroidManifest.xml
-
-# Jarjar to make WrapTest unique.
-LOCAL_JARJAR_RULES := $(LOCAL_PATH)/jarjar-rules.txt
-
-LOCAL_USE_EMBEDDED_NATIVE_LIBS := false
-
-include $(BUILD_PACKAGE)
-
-include $(CLEAR_VARS)