Merge "Move bionic test libraries to a default, for easy consumption in cts." into main am: e219a4179f

Original change: https://android-review.googlesource.com/c/platform/bionic/+/2719254

Change-Id: Ibcb2310d8d2b737dcbdf2adb8d372820ee59f010
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Mitch Phillips 2023-08-21 16:36:40 +00:00 committed by Automerger Merge Worker
commit c5f691b9a6

View file

@ -867,79 +867,8 @@ cc_test_library {
], ],
} }
// -----------------------------------------------------------------------------
// Tests for the device using bionic's .so. Run with:
// adb shell /data/nativetest/bionic-unit-tests/bionic-unit-tests
// adb shell /data/nativetest64/bionic-unit-tests/bionic-unit-tests
// -----------------------------------------------------------------------------
cc_defaults { cc_defaults {
name: "bionic_unit_tests_defaults", name: "bionic_unit_tests_data",
host_supported: false,
gtest: false,
defaults: [
"bionic_tests_defaults",
],
whole_static_libs: [
"libBionicTests",
"libBionicLoaderTests",
"libBionicElfTlsLoaderTests",
],
static_libs: [
"libtinyxml2",
"liblog",
"libbase",
"libgtest_isolated",
],
srcs: [
// TODO: Include __cxa_thread_atexit_test.cpp to glibc tests once it is upgraded (glibc 2.18+)
"__cxa_thread_atexit_test.cpp",
"gtest_globals.cpp",
"gtest_main.cpp",
"gwp_asan_test.cpp",
"thread_local_test.cpp",
],
conlyflags: [
"-fexceptions",
"-fnon-call-exceptions",
],
ldflags: ["-Wl,--export-dynamic"],
include_dirs: ["bionic/libc"],
stl: "libc++_static",
target: {
android: {
shared_libs: [
"ld-android",
"libdl",
"libdl_android",
"libdl_preempt_test_1",
"libdl_preempt_test_2",
"libdl_test_df_1_global",
"libtest_elftls_shared_var",
"libtest_elftls_tprel",
],
static_libs: [
// The order of these libraries matters, do not shuffle them.
"libmeminfo",
"libziparchive",
"libz",
"libutils",
],
ldflags: [
"-Wl,--rpath,${ORIGIN}/bionic-loader-test-libs",
"-Wl,--enable-new-dtags",
],
},
},
data_bins: [ data_bins: [
"cfi_test_helper", "cfi_test_helper",
"cfi_test_helper2", "cfi_test_helper2",
@ -967,7 +896,6 @@ cc_defaults {
"thread_exit_cb_helper", "thread_exit_cb_helper",
"tls_properties_helper", "tls_properties_helper",
], ],
data_libs: [ data_libs: [
"libatest_simple_zip", "libatest_simple_zip",
"libcfi-test", "libcfi-test",
@ -1104,6 +1032,81 @@ cc_defaults {
], ],
} }
// -----------------------------------------------------------------------------
// Tests for the device using bionic's .so. Run with:
// adb shell /data/nativetest/bionic-unit-tests/bionic-unit-tests
// adb shell /data/nativetest64/bionic-unit-tests/bionic-unit-tests
// -----------------------------------------------------------------------------
cc_defaults {
name: "bionic_unit_tests_defaults",
host_supported: false,
gtest: false,
defaults: [
"bionic_tests_defaults",
"bionic_unit_tests_data",
],
whole_static_libs: [
"libBionicTests",
"libBionicLoaderTests",
"libBionicElfTlsLoaderTests",
],
static_libs: [
"libtinyxml2",
"liblog",
"libbase",
"libgtest_isolated",
],
srcs: [
// TODO: Include __cxa_thread_atexit_test.cpp to glibc tests once it is upgraded (glibc 2.18+)
"__cxa_thread_atexit_test.cpp",
"gtest_globals.cpp",
"gtest_main.cpp",
"gwp_asan_test.cpp",
"thread_local_test.cpp",
],
conlyflags: [
"-fexceptions",
"-fnon-call-exceptions",
],
ldflags: ["-Wl,--export-dynamic"],
include_dirs: ["bionic/libc"],
stl: "libc++_static",
target: {
android: {
shared_libs: [
"ld-android",
"libdl",
"libdl_android",
"libdl_preempt_test_1",
"libdl_preempt_test_2",
"libdl_test_df_1_global",
"libtest_elftls_shared_var",
"libtest_elftls_tprel",
],
static_libs: [
// The order of these libraries matters, do not shuffle them.
"libmeminfo",
"libziparchive",
"libz",
"libutils",
],
ldflags: [
"-Wl,--rpath,${ORIGIN}/bionic-loader-test-libs",
"-Wl,--enable-new-dtags",
],
},
},
}
cc_test { cc_test {
name: "bionic-unit-tests", name: "bionic-unit-tests",
defaults: [ defaults: [