Merge "Add smoke test for jni library"

am: 98ad72632c

Change-Id: Iedb44739539f63090b067c1a25d4e83c333caddb
This commit is contained in:
Chenbo Feng
2019-04-09 23:50:10 -07:00
committed by android-build-merger
2 changed files with 17 additions and 1 deletions

View File

@@ -48,7 +48,6 @@ java_defaults {
"libselinux",
"libui",
"libutils",
"libvintf",
"libvndksupport",
"libtinyxml2",
"libunwindstack",

View File

@@ -0,0 +1,17 @@
// This test exists only because the jni_libs list for these tests is difficult to
// maintain: the test itself only depends on libnetworkstatsfactorytestjni, but the test
// fails to load that library unless *all* the dependencies of that library are explicitly
// listed in jni_libs. This means that whenever any of the dependencies changes the test
// starts failing and breaking presubmits in frameworks/base. We cannot easily put
// FrameworksNetTests into global presubmit because they are at times flaky, but this
// test is effectively empty beyond validating that the libraries load correctly, and
// thus should be stable enough to put in global presubmit.
//
// TODO: remove this hack when there is a better solution for jni_libs that includes
// dependent libraries.
android_test {
name: "FrameworksNetSmokeTests",
defaults: ["FrameworksNetTests-jni-defaults"],
srcs: ["java/SmokeTest.java"],
test_suites: ["device-tests"],
}