blob: 836ded5d254d90e6a92a955ae7ffa3d853dab91c [file] [log] [blame]
Ryan Lothian6699eaf2018-10-30 17:36:59 -04001# Copyright (C) 2018 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15#############################################
16# Launcher Robolectric test target. #
17#############################################
18LOCAL_PATH := $(call my-dir)
19include $(CLEAR_VARS)
20
21LOCAL_MODULE := LauncherRoboTests
Sunny Goyal9ae9b602019-12-18 19:29:00 +053022LOCAL_MODULE_CLASS := JAVA_LIBRARIES
23
Sunny Goyalc57a7972020-04-08 16:27:28 -070024LOCAL_SDK_VERSION := system_current
Sunny Goyal34ff8cb2020-04-20 14:41:23 -070025LOCAL_SRC_FILES := \
26 $(call all-java-files-under, src) \
27 $(call all-java-files-under, ../tests/src_common)
28
Ryan Lothian6699eaf2018-10-30 17:36:59 -040029LOCAL_STATIC_JAVA_LIBRARIES := \
30 androidx.test.runner \
31 androidx.test.rules \
32 mockito-robolectric-prebuilt \
33 truth-prebuilt
34LOCAL_JAVA_LIBRARIES := \
Pinyao Ting5f8a1ab2020-01-24 16:39:08 -080035 platform-robolectric-4.3.1-prebuilt
Ryan Lothian6699eaf2018-10-30 17:36:59 -040036
Sunny Goyal06a07e92018-11-07 16:54:02 -080037LOCAL_JAVA_RESOURCE_DIRS := resources config
38
Ryan Lothian6699eaf2018-10-30 17:36:59 -040039LOCAL_INSTRUMENTATION_FOR := Launcher3
40LOCAL_MODULE_TAGS := optional
41
Sunny Goyal9ae9b602019-12-18 19:29:00 +053042# Generate test_config.properties
43include external/robolectric-shadows/gen_test_config.mk
44
Ryan Lothian6699eaf2018-10-30 17:36:59 -040045include $(BUILD_STATIC_JAVA_LIBRARY)
46
47############################################
48# Target to run the previous target. #
49############################################
50include $(CLEAR_VARS)
51
52LOCAL_MODULE := RunLauncherRoboTests
Sunny Goyalc57a7972020-04-08 16:27:28 -070053LOCAL_SDK_VERSION := system_current
Sunny Goyal9ae9b602019-12-18 19:29:00 +053054LOCAL_JAVA_LIBRARIES := LauncherRoboTests
Ryan Lothian6699eaf2018-10-30 17:36:59 -040055
Amin Shaikhfd329d12019-05-03 12:44:50 -040056LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
Ryan Lothian6699eaf2018-10-30 17:36:59 -040057LOCAL_TEST_PACKAGE := Launcher3
Chihhang Chuanga16ce7e2020-02-07 17:38:20 +080058LOCAL_INSTRUMENT_SOURCE_DIRS := packages/apps/Launcher3/src
Ryan Lothian6699eaf2018-10-30 17:36:59 -040059
60LOCAL_ROBOTEST_TIMEOUT := 36000
61
Sunny Goyal986ea0d2020-11-05 17:07:35 -080062include prebuilts/misc/common/robolectric/4.4/run_robotests.mk