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

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1433924

Merged-In: I3f1d7019f1a12647b78630a412df3adf03e9e95a
Change-Id: Id189676b7447c6cb0f8d9b216c42a34c6513ba61
This commit is contained in:
markchien
2020-11-04 22:09:33 +08:00
committed by Mark Chien
parent 1d5b21140c
commit 75b84e4cb4
2 changed files with 5 additions and 1 deletions

View File

@@ -22,7 +22,6 @@ java_defaults {
static_libs: [
"NetworkStackApiStableLib",
"androidx.test.rules",
"frameworks-base-testutils",
"mockito-target-extended-minus-junit4",
"net-tests-utils",
"testables",

View File

@@ -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*