Run NetworkStaticLibTests on the actual source files.
Currently, NetworkStaticLibTests tests the class files that are
on the bootclasspath of the device. This makes running these
tests slow and/or confusing, because the framework must be
rebuilt and the device flashed before running the tests, and if
this is not done, the old code will be tested instead.
Instead, jarjar the tests so the test can be run without updating
the device.
Bug: 142892223
Test: atest NetworkStaticLibTests passes on device that does not have the library
Change-Id: I6a0dbebddbd0b64e2722078345ffe6b0c0a1801e
diff --git a/staticlibs/tests/unit/Android.bp b/staticlibs/tests/unit/Android.bp
index 4a51a8c..fe363f5 100644
--- a/staticlibs/tests/unit/Android.bp
+++ b/staticlibs/tests/unit/Android.bp
@@ -6,9 +6,12 @@
name: "NetworkStaticLibTests",
certificate: "platform",
srcs: ["src/**/*.java","src/**/*.kt"],
+ jarjar_rules: "jarjar-rules.txt",
test_suites: ["device-tests"],
static_libs: [
"androidx.test.rules",
+ "net-utils-framework-common",
+ "net-utils-services-common",
],
libs: [
"android.test.runner",