aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWei Li <weiwli@google.com>2023-12-06 03:09:19 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-12-06 03:09:19 +0000
commit548c35d53cd9a28c4ed23217c73316395f2dcb64 (patch)
tree6d8eed34bac409f3c876db991d6aab43fbca41b8
parent4c15a45ece04484e624c146246a9d2acdcfb01d7 (diff)
parent509c3eb0fdc50a9cef7791e888247d540ca097dc (diff)
downloadTV-548c35d53cd9a28c4ed23217c73316395f2dcb64.tar.gz
Merge "mk2bp conversion of TV" into main am: 0230f43caf am: 509c3eb0fd
Original change: https://android-review.googlesource.com/c/platform/packages/apps/TV/+/2826213 Change-Id: I60d20ea774346de634ec62e7a24e7914e4fb6173 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--tests/Android.bp45
-rw-r--r--tests/Android.mk1
-rw-r--r--tests/common/Android.bp25
-rw-r--r--tests/common/Android.mk28
-rw-r--r--tests/unit/Android.mk32
5 files changed, 70 insertions, 61 deletions
diff --git a/tests/Android.bp b/tests/Android.bp
new file mode 100644
index 00000000..50f2f715
--- /dev/null
+++ b/tests/Android.bp
@@ -0,0 +1,45 @@
+//
+// Copyright (C) 2023 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+package {
+ // See: http://go/android-license-faq
+ default_applicable_licenses: [
+ "Android-Apache-2.0",
+ ],
+}
+
+android_test {
+ name: "TVUnitTests",
+ package_name: "com.android.tv.tests",
+ srcs: ["unit/src/**/*.java"],
+ static_libs: [
+ "androidx.test.runner",
+ "mockito-robolectric-prebuilt",
+ "tv-test-common",
+ ],
+ libs: [
+ "android.test.runner.stubs",
+ "android.test.base.stubs",
+ "android.test.mock.stubs",
+ ],
+ manifest: "unit/AndroidManifest.xml",
+ resource_dirs: ["common/res"],
+ instrumentation_for: "LiveTv",
+ sdk_version: "system_current",
+ optimize: {
+ enabled: false,
+ },
+}
diff --git a/tests/Android.mk b/tests/Android.mk
deleted file mode 100644
index 5053e7d6..00000000
--- a/tests/Android.mk
+++ /dev/null
@@ -1 +0,0 @@
-include $(call all-subdir-makefiles)
diff --git a/tests/common/Android.bp b/tests/common/Android.bp
index 4e194a63..f1f15263 100644
--- a/tests/common/Android.bp
+++ b/tests/common/Android.bp
@@ -52,3 +52,28 @@ android_library {
},
}
+
+android_library {
+ name: "tv-test-common-robo",
+ srcs: [
+ "src/com/android/tv/testing/robo/**/*.java",
+ "src/com/android/tv/testing/shadows/**/*.java",
+ ],
+ static_libs: [
+ "robolectric_android-all-stub",
+ "Robolectric_all-target",
+ "mockito-robolectric-prebuilt",
+ "tv-test-common",
+ ],
+ // Disable dexpreopt and <uses-library> check for test.
+ enforce_uses_libs: false,
+ dex_preopt: {
+ enabled: false,
+ },
+ resource_dirs: [
+ "res",
+ ],
+ libs: [
+ "LiveTv",
+ ],
+}
diff --git a/tests/common/Android.mk b/tests/common/Android.mk
deleted file mode 100644
index 7a232ff7..00000000
--- a/tests/common/Android.mk
+++ /dev/null
@@ -1,28 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := tv-test-common-robo
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
-LOCAL_LICENSE_CONDITIONS := notice
-
-LOCAL_SRC_FILES := \
- $(call all-java-files-under, src/com/android/tv/testing/robo) \
- $(call all-java-files-under, src/com/android/tv/testing/shadows)
-
-LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
-
-LOCAL_STATIC_JAVA_LIBRARIES := \
- robolectric_android-all-stub \
- Robolectric_all-target \
- mockito-robolectric-prebuilt \
- tv-test-common \
-
-# Disable dexpreopt and <uses-library> check for test.
-LOCAL_ENFORCE_USES_LIBRARIES := false
-LOCAL_DEX_PREOPT := false
-
-LOCAL_INSTRUMENTATION_FOR := LiveTv
-
-LOCAL_MODULE_TAGS := optional
-
-include $(BUILD_STATIC_JAVA_LIBRARY)
diff --git a/tests/unit/Android.mk b/tests/unit/Android.mk
deleted file mode 100644
index 6123af7b..00000000
--- a/tests/unit/Android.mk
+++ /dev/null
@@ -1,32 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := tests
-
-
-# Include all test java files.
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
-LOCAL_STATIC_JAVA_LIBRARIES := \
- androidx.test.runner \
- mockito-robolectric-prebuilt \
- tv-test-common \
-
-LOCAL_JAVA_LIBRARIES := \
- android.test.runner.stubs \
- android.test.base.stubs \
- android.test.mock.stubs \
-
-
-LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/../common/res
-
-LOCAL_PACKAGE_NAME := TVUnitTests
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
-LOCAL_LICENSE_CONDITIONS := notice
-
-LOCAL_INSTRUMENTATION_FOR := LiveTv
-
-LOCAL_SDK_VERSION := system_current
-
-LOCAL_PROGUARD_ENABLED := disabled
-include $(BUILD_PACKAGE)