aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWei Li <weiwli@google.com>2023-12-06 03:10:15 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-12-06 03:10:15 +0000
commit7d4a5b540f3a05b5ceaa668de5e191b917871cf7 (patch)
tree0e01825bbbbaf4ffe491fb0de5bf2fa94994377f
parent548c35d53cd9a28c4ed23217c73316395f2dcb64 (diff)
parentc1b3696d605e6129d81bab5ead0ab2bf86966a43 (diff)
downloadTV-7d4a5b540f3a05b5ceaa668de5e191b917871cf7.tar.gz
Merge "mk2bp conversion for TvRoboTests and TvTunerRoboTests" into main am: 020295edbf am: c1b3696d60
Original change: https://android-review.googlesource.com/c/platform/packages/apps/TV/+/2822172 Change-Id: I9016fc122965e9a1d39536673bbd56e1351c2ccd Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--common/tests/robotests/Android.bp50
-rw-r--r--common/tests/robotests/Android.mk54
-rw-r--r--tests/robotests/Android.bp57
-rw-r--r--tests/robotests/Android.mk78
-rw-r--r--tuner/tests/robotests/Android.bp51
-rw-r--r--tuner/tests/robotests/Android.mk72
6 files changed, 158 insertions, 204 deletions
diff --git a/common/tests/robotests/Android.bp b/common/tests/robotests/Android.bp
new file mode 100644
index 00000000..babaf7d0
--- /dev/null
+++ b/common/tests/robotests/Android.bp
@@ -0,0 +1,50 @@
+//
+// 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_robolectric_test {
+ name: "TvCommonRoboTests",
+ srcs: [
+ "src/**/*.java",
+ ],
+ java_resource_dirs: ["config"],
+ libs: [
+ "robolectric_android-all-stub",
+ "Robolectric_all-target",
+ "mockito-robolectric-prebuilt",
+ "diffutils-prebuilt-jar",
+ ],
+ static_libs: [
+ "tv-lib-truth",
+ "androidx.test.ext.truth",
+ "tv-test-common",
+ "tv-test-common-robo",
+ ],
+ plugins: [
+ "tv-lib-dagger-android-processor",
+ "tv-lib-dagger-compiler",
+ ],
+ instrumentation_for: "LiveTv",
+ test_options: {
+ timeout: 36000,
+ },
+}
diff --git a/common/tests/robotests/Android.mk b/common/tests/robotests/Android.mk
deleted file mode 100644
index 85512fb6..00000000
--- a/common/tests/robotests/Android.mk
+++ /dev/null
@@ -1,54 +0,0 @@
-#############################################################
-# Tv Common Robolectric test target. #
-#############################################################
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := TvCommonRoboTests
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
-LOCAL_LICENSE_CONDITIONS := notice
-LOCAL_MODULE_CLASS := JAVA_LIBRARIES
-
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
-LOCAL_JAVA_LIBRARIES := \
- Robolectric_all-target \
- mockito-robolectric-prebuilt \
- robolectric_android-all-stub \
- diffutils-prebuilt-jar \
-
-LOCAL_STATIC_JAVA_LIBRARIES := \
- tv-lib-truth \
-
-LOCAL_STATIC_ANDROID_LIBRARIES := \
- androidx.test.ext.truth \
- tv-test-common \
- tv-test-common-robo \
-
-LOCAL_INSTRUMENTATION_FOR := LiveTv
-
-LOCAL_MODULE_TAGS := optional
-
-include $(BUILD_STATIC_JAVA_LIBRARY)
-
-#############################################################
-# Tv common runner target to run the previous target. #
-#############################################################
-include $(CLEAR_VARS)
-LOCAL_MODULE := RunTvCommonRoboTests
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
-LOCAL_LICENSE_CONDITIONS := notice
-
-LOCAL_ROBOTEST_FILES := $(call find-files-in-subdirs,$(LOCAL_PATH)/src,*Test.java,.)
-
-LOCAL_JAVA_LIBRARIES := \
- TvCommonRoboTests \
- Robolectric_all-target \
- mockito-robolectric-prebuilt \
- robolectric_android-all-stub \
-
-LOCAL_TEST_PACKAGE := LiveTv
-
-LOCAL_ROBOTEST_TIMEOUT := 36000
-
-include external/robolectric-shadows/run_robotests.mk
diff --git a/tests/robotests/Android.bp b/tests/robotests/Android.bp
new file mode 100644
index 00000000..a89f38fe
--- /dev/null
+++ b/tests/robotests/Android.bp
@@ -0,0 +1,57 @@
+//
+// Copyright 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_robolectric_test {
+ name: "TvRoboTests",
+ srcs: [
+ "src/**/*.java",
+ ],
+ exclude_srcs: [
+ "src/com/android/tv/data/epg/EpgFetcherImplTest.java",
+ "src/com/android/tv/guide/ProgramItemViewTest.java",
+ ],
+ libs: [
+ "Robolectric_all-target",
+ "mockito-robolectric-prebuilt",
+ "robolectric_android-all-stub",
+ ],
+ static_libs: [
+ "tv-lib-dagger",
+ "tv-lib-truth",
+ "android-support-annotations",
+ "androidx.leanback_leanback-nodeps",
+ "androidx.test.core",
+ "androidx.test.ext.truth",
+ "tv-lib-dagger-android",
+ "tv-test-common",
+ "tv-test-common-robo",
+ ],
+ plugins: [
+ "tv-lib-dagger-android-processor",
+ "tv-lib-dagger-compiler",
+ ],
+ instrumentation_for: "LiveTv",
+ test_options: {
+ timeout: 36000,
+ },
+}
diff --git a/tests/robotests/Android.mk b/tests/robotests/Android.mk
deleted file mode 100644
index c5341ab8..00000000
--- a/tests/robotests/Android.mk
+++ /dev/null
@@ -1,78 +0,0 @@
-#############################################################
-# Tv Robolectric test target. #
-#############################################################
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := TvRoboTests
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
-LOCAL_LICENSE_CONDITIONS := notice
-LOCAL_MODULE_CLASS := JAVA_LIBRARIES
-
-BASE_DIR = src/com/android/tv
-EXCLUDE_FILES := \
- $(BASE_DIR)/data/epg/EpgFetcherImplTest.java \
- $(BASE_DIR)/guide/ProgramItemViewTest.java \
-
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-LOCAL_SRC_FILES := $(filter-out $(EXCLUDE_FILES),$(LOCAL_SRC_FILES))
-
-LOCAL_JAVA_LIBRARIES := \
- Robolectric_all-target \
- mockito-robolectric-prebuilt \
- robolectric_android-all-stub \
-
-LOCAL_STATIC_JAVA_LIBRARIES := \
- tv-lib-dagger \
- tv-lib-truth \
-
-LOCAL_STATIC_ANDROID_LIBRARIES := \
- androidx.leanback_leanback-nodeps \
- androidx.test.core \
- androidx.test.ext.truth \
- tv-lib-dagger-android \
- tv-test-common \
- tv-test-common-robo \
-
-LOCAL_ANNOTATION_PROCESSORS := \
- tv-lib-dagger-android-processor \
- tv-lib-dagger-compiler \
-
-LOCAL_ANNOTATION_PROCESSOR_CLASSES := \
- dagger.internal.codegen.ComponentProcessor,dagger.android.processor.AndroidProcessor
-
-LOCAL_INSTRUMENTATION_FOR := LiveTv
-
-LOCAL_MODULE_TAGS := optional
-
-include $(BUILD_STATIC_JAVA_LIBRARY)
-
-#############################################################
-# Tv runner target to run the previous target. #
-#############################################################
-include $(CLEAR_VARS)
-LOCAL_MODULE := RunTvRoboTests
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
-LOCAL_LICENSE_CONDITIONS := notice
-
-BASE_DIR = com/android/tv
-EXCLUDE_FILES := \
- $(BASE_DIR)/data/epg/EpgFetcherImplTest.java \
- $(BASE_DIR)/guide/ProgramItemViewTest.java \
-
-LOCAL_ROBOTEST_FILES := $(call find-files-in-subdirs,$(LOCAL_PATH)/src,*Test.java,.)
-LOCAL_ROBOTEST_FILES := $(filter-out $(EXCLUDE_FILES),$(LOCAL_ROBOTEST_FILES))
-
-LOCAL_JAVA_LIBRARIES := \
- Robolectric_all-target \
- TvRoboTests \
- mockito-robolectric-prebuilt \
- robolectric_android-all-stub \
- tv-test-common \
- tv-test-common-robo \
-
-LOCAL_TEST_PACKAGE := LiveTv
-
-LOCAL_ROBOTEST_TIMEOUT := 36000
-
-include external/robolectric-shadows/run_robotests.mk
diff --git a/tuner/tests/robotests/Android.bp b/tuner/tests/robotests/Android.bp
new file mode 100644
index 00000000..99926e74
--- /dev/null
+++ b/tuner/tests/robotests/Android.bp
@@ -0,0 +1,51 @@
+//
+// 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_robolectric_test {
+ name: "TvTunerRoboTests",
+ srcs: [
+ "javatests/**/*.java",
+ ],
+ java_resource_dirs: ["config"],
+ libs: [
+ "robolectric_android-all-stub",
+ "Robolectric_all-target",
+ "mockito-robolectric-prebuilt",
+ ],
+ static_libs: [
+ "tv-lib-dagger",
+ "androidx.test.core",
+ "tv-lib-dagger-android",
+ "tv-test-common",
+ "tv-test-common-robo",
+ "tv-tuner-testing",
+ ],
+ plugins: [
+ "tv-lib-dagger-android-processor",
+ "tv-lib-dagger-compiler",
+ ],
+ instrumentation_for: "LiveTv",
+ test_options: {
+ timeout: 36000,
+ },
+}
diff --git a/tuner/tests/robotests/Android.mk b/tuner/tests/robotests/Android.mk
deleted file mode 100644
index bf2f24c8..00000000
--- a/tuner/tests/robotests/Android.mk
+++ /dev/null
@@ -1,72 +0,0 @@
-#############################################################
-# Tv Robolectric test target. #
-#############################################################
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := TvTunerRoboTests
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
-LOCAL_LICENSE_CONDITIONS := notice
-LOCAL_MODULE_CLASS := JAVA_LIBRARIES
-
-LOCAL_SRC_FILES := $(call all-java-files-under, javatests)
-
-LOCAL_JAVA_LIBRARIES := \
- Robolectric_all-target \
- mockito-robolectric-prebuilt \
- robolectric_android-all-stub \
-
-LOCAL_STATIC_JAVA_LIBRARIES := \
- tv-lib-dagger
-
-LOCAL_STATIC_ANDROID_LIBRARIES := \
- androidx.test.core \
- tv-lib-dagger-android \
- tv-test-common \
- tv-test-common-robo \
- tv-tuner-testing \
-
-LOCAL_ANNOTATION_PROCESSORS := \
- tv-lib-dagger-android-processor \
- tv-lib-dagger-compiler \
-
-LOCAL_ANNOTATION_PROCESSOR_CLASSES := \
- dagger.internal.codegen.ComponentProcessor,dagger.android.processor.AndroidProcessor
-
-LOCAL_INSTRUMENTATION_FOR := LiveTv
-
-LOCAL_MODULE_TAGS := optional
-
-include $(BUILD_STATIC_JAVA_LIBRARY)
-
-#############################################################
-# Tv runner target to run the previous target. #
-#############################################################
-include $(CLEAR_VARS)
-LOCAL_MODULE := RunTvTunerRoboTests
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
-LOCAL_LICENSE_CONDITIONS := notice
-
-BASE_DIR = com/android/tv/tuner
-EXCLUDE_FILES := \
- $(BASE_DIR)/dvb/DvbTunerHalTest.java \
- $(BASE_DIR)/exoplayer/tests/SampleSourceExtractorTest.java \
-
-LOCAL_ROBOTEST_FILES := $(call find-files-in-subdirs,$(LOCAL_PATH)/javatests,*Test.java,.)
-LOCAL_ROBOTEST_FILES := $(filter-out $(EXCLUDE_FILES),$(LOCAL_ROBOTEST_FILES))
-
-LOCAL_JAVA_LIBRARIES := \
- Robolectric_all-target \
- TvTunerRoboTests \
- mockito-robolectric-prebuilt \
- robolectric_android-all-stub \
- tv-lib-truth \
- tv-test-common \
- tv-test-common-robo \
- tv-tuner-testing \
-
-LOCAL_TEST_PACKAGE := LiveTv
-
-LOCAL_ROBOTEST_TIMEOUT := 36000
-
-include external/robolectric-shadows/run_robotests.mk