blob: cfa067f13680ea72e9ab6f591598c54c394147aa [file] [log] [blame]
Fan Zhang914afbf2016-11-01 15:36:25 -07001# 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 Zhang914afbf2016-11-01 15:36:25 -070015############################################################
16# SettingsLib Shell app just for Robolectric test target. #
17############################################################
18LOCAL_PATH := $(call my-dir)
Fan Zhang914afbf2016-11-01 15:36:25 -070019include $(CLEAR_VARS)
20
21LOCAL_PACKAGE_NAME := SettingsLibShell
Anton Hanssond137c872018-02-23 12:57:51 +000022LOCAL_PRIVATE_PLATFORM_APIS := true
Fan Zhang914afbf2016-11-01 15:36:25 -070023LOCAL_MODULE_TAGS := optional
24
25LOCAL_PRIVILEGED_MODULE := true
26
James Lemieux5c50dc12018-02-12 01:30:32 -080027LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
Soroosh Mariooryad56ce7662017-02-06 15:23:00 -080028
Aurimas Liutikas41df1092017-12-05 16:20:43 -080029LOCAL_USE_AAPT2 := true
30
Fan Zhang914afbf2016-11-01 15:36:25 -070031include frameworks/base/packages/SettingsLib/common.mk
32
33include $(BUILD_PACKAGE)
34
James Lemieuxec3ad9e2018-11-28 17:49:14 -080035############################################################
36# SettingsLib Robolectric test target. #
37############################################################
Fan Zhang914afbf2016-11-01 15:36:25 -070038include $(CLEAR_VARS)
39
James Lemieux5c50dc12018-02-12 01:30:32 -080040LOCAL_MODULE := SettingsLibRoboTests
James Lemieuxec3ad9e2018-11-28 17:49:14 -080041LOCAL_MODULE_CLASS := JAVA_LIBRARIES
James Lemieux5c50dc12018-02-12 01:30:32 -080042
Fan Zhang914afbf2016-11-01 15:36:25 -070043LOCAL_SRC_FILES := $(call all-java-files-under, src)
44
James Lemieux5c50dc12018-02-12 01:30:32 -080045LOCAL_JAVA_RESOURCE_DIRS := config
Fan Zhang914afbf2016-11-01 15:36:25 -070046
47LOCAL_JAVA_LIBRARIES := \
James Lemieux5c50dc12018-02-12 01:30:32 -080048 robolectric_android-all-stub \
49 Robolectric_all-target \
50 mockito-robolectric-prebuilt \
51 truth-prebuilt
Fan Zhang914afbf2016-11-01 15:36:25 -070052
53LOCAL_INSTRUMENTATION_FOR := SettingsLibShell
Fan Zhang914afbf2016-11-01 15:36:25 -070054
55LOCAL_MODULE_TAGS := optional
56
James Lemieuxec3ad9e2018-11-28 17:49:14 -080057# Generate test_config.properties
58include external/robolectric-shadows/gen_test_config.mk
59
Fan Zhang914afbf2016-11-01 15:36:25 -070060include $(BUILD_STATIC_JAVA_LIBRARY)
61
62#############################################################
James Lemieux5c50dc12018-02-12 01:30:32 -080063# SettingsLib runner target to run the previous target. #
Fan Zhang914afbf2016-11-01 15:36:25 -070064#############################################################
65include $(CLEAR_VARS)
66
67LOCAL_MODULE := RunSettingsLibRoboTests
68
James Lemieux5c50dc12018-02-12 01:30:32 -080069LOCAL_JAVA_LIBRARIES := \
70 SettingsLibRoboTests \
71 robolectric_android-all-stub \
72 Robolectric_all-target \
73 mockito-robolectric-prebuilt \
74 truth-prebuilt
Fan Zhang914afbf2016-11-01 15:36:25 -070075
76LOCAL_TEST_PACKAGE := SettingsLibShell
77
Tony Mantlerf6631bf2017-10-10 11:09:08 -070078LOCAL_ROBOTEST_TIMEOUT := 36000
79
James Lemieux5c50dc12018-02-12 01:30:32 -080080include external/robolectric-shadows/run_robotests.mk