Fold the C API tests into the regular libnative{bridge,loader} tests.

They only need to be compiled. This way we avoid separate tests that
need gtest:false and that atest doesn't handle well (although there are
other reasons it doesn't handle libnativebridge-tests).

Test: art/libnativebridge/tests/runtests.sh
      atest libnativeloader_test
  with and without a planted syntax error in the .c files
Bug: 122710865
Change-Id: I3225bdb7c2dd268c2cf9353b7ce89819e6d396a5
diff --git a/libnativebridge/tests/Android.bp b/libnativebridge/tests/Android.bp
index 785ccd9..fa98f5e 100644
--- a/libnativebridge/tests/Android.bp
+++ b/libnativebridge/tests/Android.bp
@@ -107,6 +107,7 @@
     test_per_src: true,
 
     srcs: [
+        "NativeBridgeApi.c",
         "CodeCacheCreate_test.cpp",
         "CodeCacheExists_test.cpp",
         "CodeCacheStatFail_test.cpp",
@@ -152,32 +153,3 @@
     host_supported: false,
     shared_libs: ["libnativebridge_lazy"],
 }
-
-// Build the test for the C API.
-cc_test {
-    name: "libnativebridge-api-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: [
-                // gtest issue
-                "-Wno-used-but-marked-unused",
-                "-Wno-deprecated",
-                "-Wno-missing-noreturn",
-            ],
-        },
-    },
-    srcs: [
-        "NativeBridgeApi.c",
-    ],
-    header_libs: [
-        "jni_headers",
-        "libnativebridge-headers",
-    ],
-    gtest: false,
-}