summaryrefslogtreecommitdiff
path: root/libnativebridge/tests/Android.bp
diff options
context:
space:
mode:
Diffstat (limited to 'libnativebridge/tests/Android.bp')
-rw-r--r--libnativebridge/tests/Android.bp65
1 files changed, 11 insertions, 54 deletions
diff --git a/libnativebridge/tests/Android.bp b/libnativebridge/tests/Android.bp
index f9c1f490e0..dc6965f607 100644
--- a/libnativebridge/tests/Android.bp
+++ b/libnativebridge/tests/Android.bp
@@ -82,14 +82,13 @@ cc_test_library {
defaults: ["libnativebridge-test-case-defaults"],
}
-cc_defaults {
- name: "libnativebridge-tests-defaults",
+cc_test {
+ name: "libnativebridge-tests",
defaults: [
"art_defaults",
"art_test_defaults",
],
- // TODO(mast): Split up art_gtest_defaults so that it can be used for the
- // following without pulling in lots of libs.
+
target: {
linux: {
cflags: [
@@ -100,11 +99,6 @@ cc_defaults {
],
},
},
-}
-
-cc_test {
- name: "libnativebridge-tests",
- defaults: ["libnativebridge-tests-defaults"],
// native_bridge.cc doesn't support reloading the native bridge after
// unloading, so each test needs to be its own process.
@@ -154,49 +148,14 @@ cc_test {
header_libs: ["libbase_headers"],
}
-// Variant of libnativebridge-tests that is part of CTS to verify backed-by API
-// coverage.
+// Very basic tests in CTS to verify backed-by API coverage of the exported API
+// in libnativebridge.map.txt.
cc_test {
name: "art_libnativebridge_cts_tests",
- defaults: [
- "art_standalone_test_defaults",
- "libnativebridge-tests-defaults",
- ],
-
- // TODO(b/189484095): Pick only a subset of the tests in
- // libnativebridge-tests that don't require the native bridge lib to be
- // loaded, to avoid the problems with test_per_src and pushing the extra
- // libnativebridge*-test-case.so files to device through tradefed.
- srcs: [
- // ValidNameNativeBridge_test.cpp needs to be first due to global state
- // had_error that isn't reset between tests.
- "ValidNameNativeBridge_test.cpp",
- "NeedsNativeBridge_test.cpp",
- "UnavailableNativeBridge_test.cpp",
- ],
- static_libs: [
- "libdl_android",
- "libnativebridge",
- ],
- shared_libs: [
- "liblog",
- ],
- header_libs: ["libbase_headers"],
-
- // Support multilib variants (using different suffix per sub-architecture),
- // which is needed on build targets with secondary architectures, as the CTS
- // test suite packaging logic flattens all test artifacts into a single
- // `testcases` directory.
- compile_multilib: "both",
- multilib: {
- lib32: {
- suffix: "32",
- },
- lib64: {
- suffix: "64",
- },
- },
-
+ defaults: ["art_standalone_test_defaults"],
+ shared_libs: ["libnativebridge"],
+ static_libs: ["libbase"],
+ srcs: ["libnativebridge_api_test.cpp"],
test_config_template: ":art-gtests-target-standalone-cts-template",
test_suites: [
"cts",
@@ -208,12 +167,10 @@ cc_test {
cc_test {
name: "libnativebridge-lazy-tests",
- defaults: ["libnativebridge-tests-defaults"],
- host_supported: false,
- test_suites: ["device-tests"],
+ defaults: ["art_standalone_test_defaults"],
static_libs: [
"libbase",
"libnativebridge_lazy",
],
- srcs: ["libnativebridge_lazy_test.cpp"],
+ srcs: ["libnativebridge_api_test.cpp"],
}