Add TetheringCommonTests

Bug: 153614365
Bug: 153613717
Test: atest TetheringTests TetheringCoverageTests
Change-Id: If7c933ec0c72943312cd37bfc66918f10a5504a9
Merged-In: If7c933ec0c72943312cd37bfc66918f10a5504a9
(cherry picked from commit f340f6fd46b4c37f9628608c2a8e02529f6692d1, aosp/1290553)
diff --git a/Tethering/tests/unit/Android.bp b/Tethering/tests/unit/Android.bp
index 26517ce..08cfb30 100644
--- a/Tethering/tests/unit/Android.bp
+++ b/Tethering/tests/unit/Android.bp
@@ -14,6 +14,26 @@
 // limitations under the License.
 //
 
+// Tests in this folder are included both in unit tests and CTS.
+java_library {
+    name: "TetheringCommonTests",
+    srcs: [
+        "common/**/*.java",
+        "common/**/*.kt"
+    ],
+    static_libs: [
+        "androidx.test.rules",
+        "net-tests-utils",
+    ],
+    // TODO(b/147200698) change sdk_version to module-current and remove framework-minus-apex
+    sdk_version: "core_platform",
+    libs: [
+        "framework-minus-apex",
+        "framework-tethering",
+    ],
+    visibility: ["//cts/tests/tests/tethering"],
+}
+
 java_defaults {
     name: "TetheringTestsDefaults",
     srcs: [
@@ -22,6 +42,7 @@
     ],
     static_libs: [
         "TetheringApiCurrentLib",
+        "TetheringCommonTests",
         "androidx.test.rules",
         "frameworks-base-testutils",
         "mockito-target-extended-minus-junit4",