summaryrefslogtreecommitdiff
path: root/libnativebridge
diff options
context:
space:
mode:
authorMartin Stjernholm <mast@google.com>2019-10-22 12:14:20 +0100
committerTreehugger Robot <treehugger-gerrit@google.com>2019-10-22 15:08:11 +0000
commit2a21cc6849df474afc63eff21913637c313efdf5 (patch)
treedbc9d82b3b1dd1423fc0328bb639134c99015afa /libnativebridge
parent2cf00ede148bd9d77c291d4c0cb23edd5a9c36b4 (diff)
Use ART defaults for libnative{bridge,loader} tests too.
Should fix mac builds. Test: m Test: mmma art/libnativebridge/ art/libnativeloader/ Test: Forrest build on sdk_mac on git_master-without-vendor Bug: 143111454 Bug: 137364733 Bug: 133140750 Change-Id: I424399115af3a9b558d4b95e2f614807d66dbd23
Diffstat (limited to 'libnativebridge')
-rw-r--r--libnativebridge/tests/Android.bp61
1 files changed, 48 insertions, 13 deletions
diff --git a/libnativebridge/tests/Android.bp b/libnativebridge/tests/Android.bp
index 2bb8467385..92116340b3 100644
--- a/libnativebridge/tests/Android.bp
+++ b/libnativebridge/tests/Android.bp
@@ -16,13 +16,22 @@
cc_defaults {
name: "libnativebridge-dummy-defaults",
-
- host_supported: true,
- cflags: [
- "-Wall",
- "-Wextra",
- "-Werror",
+ 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: [
+ // gtest issue
+ "-Wno-used-but-marked-unused",
+ "-Wno-deprecated",
+ "-Wno-missing-noreturn",
+ ],
+ },
+ },
header_libs: ["libnativebridge-headers"],
cppflags: ["-fvisibility=protected"],
}
@@ -48,12 +57,23 @@ cc_library_shared {
// Build the unit tests.
cc_defaults {
name: "libnativebridge-tests-defaults",
- test_per_src: true,
-
- cflags: [
- "-Wall",
- "-Werror",
+ defaults: [
+ "art_defaults",
+ "art_test_defaults",
],
+ test_per_src: true,
+ // 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: [
+ // gtest issue
+ "-Wno-used-but-marked-unused",
+ "-Wno-deprecated",
+ "-Wno-missing-noreturn",
+ ],
+ },
+ },
srcs: [
"CodeCacheCreate_test.cpp",
@@ -88,21 +108,36 @@ cc_defaults {
cc_test {
name: "libnativebridge-tests",
defaults: ["libnativebridge-tests-defaults"],
- host_supported: true,
shared_libs: ["libnativebridge"],
}
cc_test {
name: "libnativebridge-lazy-tests",
defaults: ["libnativebridge-tests-defaults"],
+ host_supported: false,
shared_libs: ["libnativebridge_lazy"],
}
// Build the test for the C API.
cc_test {
name: "libnativebridge-api-tests",
- host_supported: true,
+ defaults: [
+ "art_defaults",
+ "art_test_defaults",
+ ],
test_per_src: true,
+ // 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: [
+ // gtest issue
+ "-Wno-used-but-marked-unused",
+ "-Wno-deprecated",
+ "-Wno-missing-noreturn",
+ ],
+ },
+ },
srcs: [
"NativeBridgeApi.c",
],