summaryrefslogtreecommitdiff
path: root/packages/Tethering
diff options
context:
space:
mode:
authorRemi NGUYEN VAN <reminv@google.com>2020-09-23 17:03:33 +0900
committerRemi NGUYEN VAN <reminv@google.com>2020-09-23 17:10:42 +0900
commitdaed646e47b2095941318da4cbd92befad77e991 (patch)
treebb23602948f9113fccfe9234f3d094d52443bb42 /packages/Tethering
parent70b20ee0b885e250adba8cfea36fa06e6d8b073b (diff)
Remove unused testutils lib from tethering tests
frameworks-base-testutils is unused in tethering integration tests, so the dependency can be removed. That test library also contains test classes, so removing the dependency allows tethering tests to stop running the associated tests. Also add jarjar rules to the unit tests to zap (remove) the test classes from the output APK. Ideally the unit tests should stop depending on that library too (TestableLooper can be used instead of TestLooper), or the frameworks-base-testutils library should stop including test classes. Bug: 167968946 Test: m CtsTetheringTest TetheringTests Change-Id: Ie950ce5b6181e388a7f71da430fd2dd8ada32e49
Diffstat (limited to 'packages/Tethering')
-rw-r--r--packages/Tethering/tests/integration/Android.bp1
-rw-r--r--packages/Tethering/tests/unit/jarjar-rules.txt5
2 files changed, 5 insertions, 1 deletions
diff --git a/packages/Tethering/tests/integration/Android.bp b/packages/Tethering/tests/integration/Android.bp
index ed69b7d63cb4..02bab9ba353e 100644
--- a/packages/Tethering/tests/integration/Android.bp
+++ b/packages/Tethering/tests/integration/Android.bp
@@ -22,7 +22,6 @@ java_defaults {
static_libs: [
"NetworkStackApiStableLib",
"androidx.test.rules",
- "frameworks-base-testutils",
"mockito-target-extended-minus-junit4",
"net-tests-utils",
"testables",
diff --git a/packages/Tethering/tests/unit/jarjar-rules.txt b/packages/Tethering/tests/unit/jarjar-rules.txt
index ec2d2b02004e..7ed89632a861 100644
--- a/packages/Tethering/tests/unit/jarjar-rules.txt
+++ b/packages/Tethering/tests/unit/jarjar-rules.txt
@@ -9,3 +9,8 @@ rule com.android.internal.util.StateMachine* com.android.networkstack.tethering.
rule com.android.internal.util.TrafficStatsConstants* com.android.networkstack.tethering.util.TrafficStatsConstants@1
rule android.util.LocalLog* com.android.networkstack.tethering.util.LocalLog@1
+
+# TODO: either stop using frameworks-base-testutils or remove the unit test classes it contains.
+# TestableLooper from "testables" can be used instead of TestLooper from frameworks-base-testutils.
+zap android.os.test.TestLooperTest*
+zap com.android.test.filters.SelectTestTests* \ No newline at end of file