• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#############################################################
2# Tv Robolectric test target.                               #
3#############################################################
4LOCAL_PATH := $(call my-dir)
5include $(CLEAR_VARS)
6
7LOCAL_MODULE := TvRoboTests
8LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
9LOCAL_LICENSE_CONDITIONS := notice
10LOCAL_MODULE_CLASS := JAVA_LIBRARIES
11
12BASE_DIR = src/com/android/tv
13EXCLUDE_FILES := \
14    $(BASE_DIR)/data/epg/EpgFetcherImplTest.java \
15    $(BASE_DIR)/guide/ProgramItemViewTest.java \
16
17LOCAL_SRC_FILES := $(call all-java-files-under, src)
18LOCAL_SRC_FILES := $(filter-out $(EXCLUDE_FILES),$(LOCAL_SRC_FILES))
19
20LOCAL_JAVA_LIBRARIES := \
21    Robolectric_all-target \
22    mockito-robolectric-prebuilt \
23    robolectric_android-all-stub \
24
25LOCAL_STATIC_JAVA_LIBRARIES := \
26    tv-lib-dagger \
27    tv-lib-truth \
28
29LOCAL_STATIC_ANDROID_LIBRARIES := \
30    androidx.leanback_leanback-nodeps \
31    androidx.test.core \
32    androidx.test.ext.truth \
33    tv-lib-dagger-android \
34    tv-test-common \
35    tv-test-common-robo \
36
37LOCAL_ANNOTATION_PROCESSORS := \
38    tv-lib-dagger-android-processor \
39    tv-lib-dagger-compiler \
40
41LOCAL_ANNOTATION_PROCESSOR_CLASSES := \
42  dagger.internal.codegen.ComponentProcessor,dagger.android.processor.AndroidProcessor
43
44LOCAL_INSTRUMENTATION_FOR := LiveTv
45
46LOCAL_MODULE_TAGS := optional
47
48include $(BUILD_STATIC_JAVA_LIBRARY)
49
50#############################################################
51# Tv runner target to run the previous target.              #
52#############################################################
53include $(CLEAR_VARS)
54LOCAL_MODULE := RunTvRoboTests
55LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
56LOCAL_LICENSE_CONDITIONS := notice
57
58BASE_DIR = com/android/tv
59EXCLUDE_FILES := \
60    $(BASE_DIR)/data/epg/EpgFetcherImplTest.java \
61    $(BASE_DIR)/guide/ProgramItemViewTest.java \
62
63LOCAL_ROBOTEST_FILES := $(call find-files-in-subdirs,$(LOCAL_PATH)/src,*Test.java,.)
64LOCAL_ROBOTEST_FILES := $(filter-out $(EXCLUDE_FILES),$(LOCAL_ROBOTEST_FILES))
65
66LOCAL_JAVA_LIBRARIES := \
67    Robolectric_all-target \
68    TvRoboTests \
69    mockito-robolectric-prebuilt \
70    robolectric_android-all-stub \
71    tv-test-common \
72    tv-test-common-robo \
73
74LOCAL_TEST_PACKAGE := LiveTv
75
76LOCAL_ROBOTEST_TIMEOUT := 36000
77
78include external/robolectric-shadows/run_robotests.mk
79