86 lines
2.3 KiB
Plaintext
86 lines
2.3 KiB
Plaintext
package {
|
|
default_applicable_licenses: ["Android-Apache-2.0"],
|
|
}
|
|
|
|
android_test {
|
|
name: "MicrodroidTestApp",
|
|
test_suites: [
|
|
"cts",
|
|
"general-tests",
|
|
],
|
|
srcs: ["src/java/**/*.java"],
|
|
static_libs: [
|
|
"MicrodroidDeviceTestHelper",
|
|
"androidx.test.runner",
|
|
"androidx.test.ext.junit",
|
|
"authfs_test_apk_assets",
|
|
"cbor-java",
|
|
"com.android.microdroid.testservice-java",
|
|
"truth-prebuilt",
|
|
"compatibility-common-util-devicesidelib",
|
|
],
|
|
sdk_version: "test_current",
|
|
jni_libs: [
|
|
"MicrodroidTestNativeLib",
|
|
"MicrodroidIdleNativeLib",
|
|
"MicrodroidEmptyNativeLib",
|
|
"MicrodroidPrivateLinkingNativeLib",
|
|
],
|
|
jni_uses_platform_apis: true,
|
|
use_embedded_native_libs: true,
|
|
// We only support 64-bit ABI, but CTS demands all APKs to be multi-ABI.
|
|
compile_multilib: "both",
|
|
min_sdk_version: "33",
|
|
}
|
|
|
|
cc_library_shared {
|
|
name: "MicrodroidTestNativeLib",
|
|
srcs: ["src/native/testbinary.cpp"],
|
|
stl: "libc++_static",
|
|
header_libs: ["vm_payload_restricted_headers"],
|
|
shared_libs: [
|
|
"libbinder_ndk",
|
|
"libcap",
|
|
"MicrodroidTestNativeLibSub",
|
|
"libvm_payload#current",
|
|
],
|
|
static_libs: [
|
|
"com.android.microdroid.testservice-ndk",
|
|
"libbase",
|
|
"libfsverity_digests_proto_cc",
|
|
"liblog",
|
|
"libprotobuf-cpp-lite-ndk",
|
|
],
|
|
}
|
|
|
|
cc_library_shared {
|
|
name: "MicrodroidTestNativeLibSub",
|
|
srcs: ["src/native/testlib.cpp"],
|
|
stl: "libc++_static",
|
|
}
|
|
|
|
cc_library_shared {
|
|
name: "MicrodroidIdleNativeLib",
|
|
srcs: ["src/native/idlebinary.cpp"],
|
|
header_libs: ["vm_payload_headers"],
|
|
stl: "libc++_static",
|
|
}
|
|
|
|
// An empty payload missing AVmPayload_main
|
|
cc_library_shared {
|
|
name: "MicrodroidEmptyNativeLib",
|
|
srcs: ["src/native/emptybinary.cpp"],
|
|
stl: "none",
|
|
}
|
|
|
|
// A payload which tries to link against libselinux, one of private libraries
|
|
cc_library_shared {
|
|
name: "MicrodroidPrivateLinkingNativeLib",
|
|
srcs: ["src/native/idlebinary.cpp"],
|
|
header_libs: ["vm_payload_headers"],
|
|
// HACK: linking against "libselinux" will embed libselinux.so into the apk
|
|
// link against a stub to prevent libselinux.so from being embedded
|
|
shared_libs: ["libselinux#latest"],
|
|
stl: "libc++_static",
|
|
}
|