blob: 86a6e8ce63d38db1beee8b8f924537d12fbcf064 [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
Ryan Lothian6699eaf2018-10-30 17:36:59 -040024LOCAL_SDK_VERSION := current
25LOCAL_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 := \
Sunny Goyal4b5b0eb2019-12-02 17:00:35 -080032 platform-robolectric-4.3-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
50LOCAL_SDK_VERSION := 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
Sunny Goyal9ae9b602019-12-18 19:29:00 +053055LOCAL_INSTRUMENT_SOURCE_DIRS := $(dir $(LOCAL_PATH))../src
Ryan Lothian6699eaf2018-10-30 17:36:59 -040056
57LOCAL_ROBOTEST_TIMEOUT := 36000
58
Sunny Goyal4b5b0eb2019-12-02 17:00:35 -080059include prebuilts/misc/common/robolectric/4.3/run_robotests.mk