diff options
author | Wei Li <weiwli@google.com> | 2023-12-06 02:58:45 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2023-12-06 02:58:45 +0000 |
commit | ef75801ae917ec6d418d4b7565661e5c845553ea (patch) | |
tree | 0e01825bbbbaf4ffe491fb0de5bf2fa94994377f | |
parent | 9c16f020188e76118c8d5a221636676770f19f70 (diff) | |
parent | 020295edbf1237744b7cac332d6f756a3f4aedd5 (diff) | |
download | TV-ef75801ae917ec6d418d4b7565661e5c845553ea.tar.gz |
Merge "mk2bp conversion for TvRoboTests and TvTunerRoboTests" into main am: 020295edbf
Original change: https://android-review.googlesource.com/c/platform/packages/apps/TV/+/2822172
Change-Id: I775469ffef3b4cd5e09d20904f0c49991ab17f80
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-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 |