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