Fan Zhang | 914afbf | 2016-11-01 15:36:25 -0700 | [diff] [blame] | 1 | # Copyright (C) 2016 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 | |
Fan Zhang | 914afbf | 2016-11-01 15:36:25 -0700 | [diff] [blame] | 15 | ############################################################ |
| 16 | # SettingsLib Shell app just for Robolectric test target. # |
| 17 | ############################################################ |
| 18 | LOCAL_PATH := $(call my-dir) |
Fan Zhang | 914afbf | 2016-11-01 15:36:25 -0700 | [diff] [blame] | 19 | include $(CLEAR_VARS) |
| 20 | |
| 21 | LOCAL_PACKAGE_NAME := SettingsLibShell |
Anton Hansson | d137c87 | 2018-02-23 12:57:51 +0000 | [diff] [blame] | 22 | LOCAL_PRIVATE_PLATFORM_APIS := true |
Fan Zhang | 914afbf | 2016-11-01 15:36:25 -0700 | [diff] [blame] | 23 | LOCAL_MODULE_TAGS := optional |
| 24 | |
| 25 | LOCAL_PRIVILEGED_MODULE := true |
| 26 | |
James Lemieux | 5c50dc1 | 2018-02-12 01:30:32 -0800 | [diff] [blame] | 27 | LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res |
Soroosh Mariooryad | 56ce766 | 2017-02-06 15:23:00 -0800 | [diff] [blame] | 28 | |
Aurimas Liutikas | 41df109 | 2017-12-05 16:20:43 -0800 | [diff] [blame] | 29 | LOCAL_USE_AAPT2 := true |
| 30 | |
Fan Zhang | 914afbf | 2016-11-01 15:36:25 -0700 | [diff] [blame] | 31 | include frameworks/base/packages/SettingsLib/common.mk |
| 32 | |
| 33 | include $(BUILD_PACKAGE) |
| 34 | |
James Lemieux | ec3ad9e | 2018-11-28 17:49:14 -0800 | [diff] [blame] | 35 | ############################################################ |
| 36 | # SettingsLib Robolectric test target. # |
| 37 | ############################################################ |
Fan Zhang | 914afbf | 2016-11-01 15:36:25 -0700 | [diff] [blame] | 38 | include $(CLEAR_VARS) |
| 39 | |
James Lemieux | 5c50dc1 | 2018-02-12 01:30:32 -0800 | [diff] [blame] | 40 | LOCAL_MODULE := SettingsLibRoboTests |
James Lemieux | ec3ad9e | 2018-11-28 17:49:14 -0800 | [diff] [blame] | 41 | LOCAL_MODULE_CLASS := JAVA_LIBRARIES |
James Lemieux | 5c50dc1 | 2018-02-12 01:30:32 -0800 | [diff] [blame] | 42 | |
Fan Zhang | 914afbf | 2016-11-01 15:36:25 -0700 | [diff] [blame] | 43 | LOCAL_SRC_FILES := $(call all-java-files-under, src) |
| 44 | |
James Lemieux | 5c50dc1 | 2018-02-12 01:30:32 -0800 | [diff] [blame] | 45 | LOCAL_JAVA_RESOURCE_DIRS := config |
Fan Zhang | 914afbf | 2016-11-01 15:36:25 -0700 | [diff] [blame] | 46 | |
| 47 | LOCAL_JAVA_LIBRARIES := \ |
James Lemieux | 5c50dc1 | 2018-02-12 01:30:32 -0800 | [diff] [blame] | 48 | robolectric_android-all-stub \ |
| 49 | Robolectric_all-target \ |
| 50 | mockito-robolectric-prebuilt \ |
| 51 | truth-prebuilt |
Fan Zhang | 914afbf | 2016-11-01 15:36:25 -0700 | [diff] [blame] | 52 | |
| 53 | LOCAL_INSTRUMENTATION_FOR := SettingsLibShell |
Fan Zhang | 914afbf | 2016-11-01 15:36:25 -0700 | [diff] [blame] | 54 | |
| 55 | LOCAL_MODULE_TAGS := optional |
| 56 | |
James Lemieux | ec3ad9e | 2018-11-28 17:49:14 -0800 | [diff] [blame] | 57 | # Generate test_config.properties |
| 58 | include external/robolectric-shadows/gen_test_config.mk |
| 59 | |
Fan Zhang | 914afbf | 2016-11-01 15:36:25 -0700 | [diff] [blame] | 60 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 61 | |
| 62 | ############################################################# |
James Lemieux | 5c50dc1 | 2018-02-12 01:30:32 -0800 | [diff] [blame] | 63 | # SettingsLib runner target to run the previous target. # |
Fan Zhang | 914afbf | 2016-11-01 15:36:25 -0700 | [diff] [blame] | 64 | ############################################################# |
| 65 | include $(CLEAR_VARS) |
| 66 | |
| 67 | LOCAL_MODULE := RunSettingsLibRoboTests |
| 68 | |
James Lemieux | 5c50dc1 | 2018-02-12 01:30:32 -0800 | [diff] [blame] | 69 | LOCAL_JAVA_LIBRARIES := \ |
| 70 | SettingsLibRoboTests \ |
| 71 | robolectric_android-all-stub \ |
| 72 | Robolectric_all-target \ |
| 73 | mockito-robolectric-prebuilt \ |
| 74 | truth-prebuilt |
Fan Zhang | 914afbf | 2016-11-01 15:36:25 -0700 | [diff] [blame] | 75 | |
| 76 | LOCAL_TEST_PACKAGE := SettingsLibShell |
| 77 | |
Tony Mantler | f6631bf | 2017-10-10 11:09:08 -0700 | [diff] [blame] | 78 | LOCAL_ROBOTEST_TIMEOUT := 36000 |
| 79 | |
James Lemieux | 5c50dc1 | 2018-02-12 01:30:32 -0800 | [diff] [blame] | 80 | include external/robolectric-shadows/run_robotests.mk |