blob: 405a45808dff684d212d51ac9338791715fa2843 [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
Bob Badour4bdf3802021-02-12 17:08:17 -080022LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
23LOCAL_LICENSE_CONDITIONS := notice
24LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../NOTICE
Sunny Goyal9ae9b602019-12-18 19:29:00 +053025LOCAL_MODULE_CLASS := JAVA_LIBRARIES
26
Sunny Goyalc57a7972020-04-08 16:27:28 -070027LOCAL_SDK_VERSION := system_current
Sunny Goyal34ff8cb2020-04-20 14:41:23 -070028LOCAL_SRC_FILES := \
29 $(call all-java-files-under, src) \
30 $(call all-java-files-under, ../tests/src_common)
31
Ryan Lothian6699eaf2018-10-30 17:36:59 -040032LOCAL_STATIC_JAVA_LIBRARIES := \
33 androidx.test.runner \
34 androidx.test.rules \
35 mockito-robolectric-prebuilt \
36 truth-prebuilt
37LOCAL_JAVA_LIBRARIES := \
Pinyao Ting5f8a1ab2020-01-24 16:39:08 -080038 platform-robolectric-4.3.1-prebuilt
Ryan Lothian6699eaf2018-10-30 17:36:59 -040039
Sunny Goyal06a07e92018-11-07 16:54:02 -080040LOCAL_JAVA_RESOURCE_DIRS := resources config
41
Ryan Lothian6699eaf2018-10-30 17:36:59 -040042LOCAL_INSTRUMENTATION_FOR := Launcher3
43LOCAL_MODULE_TAGS := optional
44
Sunny Goyal9ae9b602019-12-18 19:29:00 +053045# Generate test_config.properties
46include external/robolectric-shadows/gen_test_config.mk
47
Ryan Lothian6699eaf2018-10-30 17:36:59 -040048include $(BUILD_STATIC_JAVA_LIBRARY)
49
50############################################
51# Target to run the previous target. #
52############################################
53include $(CLEAR_VARS)
54
55LOCAL_MODULE := RunLauncherRoboTests
Bob Badour4bdf3802021-02-12 17:08:17 -080056LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
57LOCAL_LICENSE_CONDITIONS := notice
58LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../NOTICE
Sunny Goyalc57a7972020-04-08 16:27:28 -070059LOCAL_SDK_VERSION := system_current
Sunny Goyal9ae9b602019-12-18 19:29:00 +053060LOCAL_JAVA_LIBRARIES := LauncherRoboTests
Ryan Lothian6699eaf2018-10-30 17:36:59 -040061
Amin Shaikhfd329d12019-05-03 12:44:50 -040062LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
Ryan Lothian6699eaf2018-10-30 17:36:59 -040063LOCAL_TEST_PACKAGE := Launcher3
Chihhang Chuanga16ce7e2020-02-07 17:38:20 +080064LOCAL_INSTRUMENT_SOURCE_DIRS := packages/apps/Launcher3/src
Ryan Lothian6699eaf2018-10-30 17:36:59 -040065
66LOCAL_ROBOTEST_TIMEOUT := 36000
67
Sunny Goyal986ea0d2020-11-05 17:07:35 -080068include prebuilts/misc/common/robolectric/4.4/run_robotests.mk