Ryan Lothian | 6699eaf | 2018-10-30 17:36:59 -0400 | [diff] [blame] | 1 | # 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 | ############################################# |
| 18 | LOCAL_PATH := $(call my-dir) |
| 19 | include $(CLEAR_VARS) |
| 20 | |
| 21 | LOCAL_MODULE := LauncherRoboTests |
Sunny Goyal | 9ae9b60 | 2019-12-18 19:29:00 +0530 | [diff] [blame] | 22 | LOCAL_MODULE_CLASS := JAVA_LIBRARIES |
| 23 | |
Sunny Goyal | c57a797 | 2020-04-08 16:27:28 -0700 | [diff] [blame] | 24 | LOCAL_SDK_VERSION := system_current |
Ryan Lothian | 6699eaf | 2018-10-30 17:36:59 -0400 | [diff] [blame] | 25 | LOCAL_SRC_FILES := $(call all-java-files-under, src) |
| 26 | LOCAL_STATIC_JAVA_LIBRARIES := \ |
| 27 | androidx.test.runner \ |
| 28 | androidx.test.rules \ |
| 29 | mockito-robolectric-prebuilt \ |
| 30 | truth-prebuilt |
| 31 | LOCAL_JAVA_LIBRARIES := \ |
Pinyao Ting | 5f8a1ab | 2020-01-24 16:39:08 -0800 | [diff] [blame] | 32 | platform-robolectric-4.3.1-prebuilt |
Ryan Lothian | 6699eaf | 2018-10-30 17:36:59 -0400 | [diff] [blame] | 33 | |
Sunny Goyal | 06a07e9 | 2018-11-07 16:54:02 -0800 | [diff] [blame] | 34 | LOCAL_JAVA_RESOURCE_DIRS := resources config |
| 35 | |
Ryan Lothian | 6699eaf | 2018-10-30 17:36:59 -0400 | [diff] [blame] | 36 | LOCAL_INSTRUMENTATION_FOR := Launcher3 |
| 37 | LOCAL_MODULE_TAGS := optional |
| 38 | |
Sunny Goyal | 9ae9b60 | 2019-12-18 19:29:00 +0530 | [diff] [blame] | 39 | # Generate test_config.properties |
| 40 | include external/robolectric-shadows/gen_test_config.mk |
| 41 | |
Ryan Lothian | 6699eaf | 2018-10-30 17:36:59 -0400 | [diff] [blame] | 42 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 43 | |
| 44 | ############################################ |
| 45 | # Target to run the previous target. # |
| 46 | ############################################ |
| 47 | include $(CLEAR_VARS) |
| 48 | |
| 49 | LOCAL_MODULE := RunLauncherRoboTests |
Sunny Goyal | c57a797 | 2020-04-08 16:27:28 -0700 | [diff] [blame] | 50 | LOCAL_SDK_VERSION := system_current |
Sunny Goyal | 9ae9b60 | 2019-12-18 19:29:00 +0530 | [diff] [blame] | 51 | LOCAL_JAVA_LIBRARIES := LauncherRoboTests |
Ryan Lothian | 6699eaf | 2018-10-30 17:36:59 -0400 | [diff] [blame] | 52 | |
Amin Shaikh | fd329d1 | 2019-05-03 12:44:50 -0400 | [diff] [blame] | 53 | LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res |
Ryan Lothian | 6699eaf | 2018-10-30 17:36:59 -0400 | [diff] [blame] | 54 | LOCAL_TEST_PACKAGE := Launcher3 |
Chihhang Chuang | a16ce7e | 2020-02-07 17:38:20 +0800 | [diff] [blame] | 55 | LOCAL_INSTRUMENT_SOURCE_DIRS := packages/apps/Launcher3/src |
Ryan Lothian | 6699eaf | 2018-10-30 17:36:59 -0400 | [diff] [blame] | 56 | |
| 57 | LOCAL_ROBOTEST_TIMEOUT := 36000 |
| 58 | |
Pinyao Ting | 5f8a1ab | 2020-01-24 16:39:08 -0800 | [diff] [blame] | 59 | include prebuilts/misc/common/robolectric/4.3.1/run_robotests.mk |