blob: bbc62e90a8bab6f08d8813cd0d5e06182c942628 [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
Ryan Lothian6699eaf2018-10-30 17:36:59 -040025LOCAL_SRC_FILES := $(call all-java-files-under, src)
26LOCAL_STATIC_JAVA_LIBRARIES := \
27 androidx.test.runner \
28 androidx.test.rules \
29 mockito-robolectric-prebuilt \
30 truth-prebuilt
31LOCAL_JAVA_LIBRARIES := \
Pinyao Ting5f8a1ab2020-01-24 16:39:08 -080032 platform-robolectric-4.3.1-prebuilt
Ryan Lothian6699eaf2018-10-30 17:36:59 -040033
Sunny Goyal06a07e92018-11-07 16:54:02 -080034LOCAL_JAVA_RESOURCE_DIRS := resources config
35
Ryan Lothian6699eaf2018-10-30 17:36:59 -040036LOCAL_INSTRUMENTATION_FOR := Launcher3
37LOCAL_MODULE_TAGS := optional
38
Sunny Goyal9ae9b602019-12-18 19:29:00 +053039# Generate test_config.properties
40include external/robolectric-shadows/gen_test_config.mk
41
Ryan Lothian6699eaf2018-10-30 17:36:59 -040042include $(BUILD_STATIC_JAVA_LIBRARY)
43
44############################################
45# Target to run the previous target. #
46############################################
47include $(CLEAR_VARS)
48
49LOCAL_MODULE := RunLauncherRoboTests
Sunny Goyalc57a7972020-04-08 16:27:28 -070050LOCAL_SDK_VERSION := system_current
Sunny Goyal9ae9b602019-12-18 19:29:00 +053051LOCAL_JAVA_LIBRARIES := LauncherRoboTests
Ryan Lothian6699eaf2018-10-30 17:36:59 -040052
Amin Shaikhfd329d12019-05-03 12:44:50 -040053LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
Ryan Lothian6699eaf2018-10-30 17:36:59 -040054LOCAL_TEST_PACKAGE := Launcher3
Chihhang Chuanga16ce7e2020-02-07 17:38:20 +080055LOCAL_INSTRUMENT_SOURCE_DIRS := packages/apps/Launcher3/src
Ryan Lothian6699eaf2018-10-30 17:36:59 -040056
57LOCAL_ROBOTEST_TIMEOUT := 36000
58
Pinyao Ting5f8a1ab2020-01-24 16:39:08 -080059include prebuilts/misc/common/robolectric/4.3.1/run_robotests.mk