diff options
author | Jim Tang <jimtang@google.com> | 2023-11-09 10:44:27 +0800 |
---|---|---|
committer | Jim Tang <jimtang@google.com> | 2023-12-01 11:25:56 +0800 |
commit | b7d9628f4cf1ccb4afc6a1fe85d2dc90072b08f8 (patch) | |
tree | f3bcc8d899598fac1a4eea1f7f931405336a0666 | |
parent | 9663f43ee4d272737fed347f9b6ef80894e9f73f (diff) | |
download | TV-b7d9628f4cf1ccb4afc6a1fe85d2dc90072b08f8.tar.gz |
mk2bp conversion for TvRoboTests and TvTunerRoboTests
Bug: 309878241
Test: atest TvRoboTests TvTunerRoboTests TvCommonRoboTests
Change-Id: Ia26ef71f80abbab5d0a3b1b1e3f4e76d16313d7e
-rw-r--r-- | common/tests/robotests/Android.bp | 50 | ||||
-rw-r--r-- | common/tests/robotests/Android.mk | 54 | ||||
-rw-r--r-- | tests/robotests/Android.bp | 57 | ||||
-rw-r--r-- | tests/robotests/Android.mk | 78 | ||||
-rw-r--r-- | tuner/tests/robotests/Android.bp | 51 | ||||
-rw-r--r-- | tuner/tests/robotests/Android.mk | 72 |
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 |