blob: 1ca6f26dfe2144a3fe3a43bd437d893ac8985731 [file] [log] [blame]
Artem Iglikov5ed1dab2017-05-25 15:56:05 +01001# 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
15
16############################################################
17# FrameworksServicesLib app just for Robolectric test target. #
18############################################################
19LOCAL_PATH := $(call my-dir)
20
21include $(CLEAR_VARS)
22
23LOCAL_PACKAGE_NAME := FrameworksServicesLib
24LOCAL_MODULE_TAGS := optional
25
26LOCAL_PRIVILEGED_MODULE := true
27
28LOCAL_STATIC_JAVA_LIBRARIES := \
Artem Iglikov5ed1dab2017-05-25 15:56:05 +010029 services.backup \
Bernardo Rufino58dd6c32017-11-09 19:30:32 +000030 services.core
Artem Iglikov5ed1dab2017-05-25 15:56:05 +010031
32include $(BUILD_PACKAGE)
33
34#############################################
35# FrameworksServices Robolectric test target. #
36#############################################
37include $(CLEAR_VARS)
38
39LOCAL_SRC_FILES := $(call all-java-files-under, src)
40
41# Include the testing libraries (JUnit4 + Robolectric libs).
42LOCAL_STATIC_JAVA_LIBRARIES := \
Bernardo Rufino90a88022017-11-13 17:19:15 +000043 platform-robolectric-android-all-stubs \
Bernardo Rufino58dd6c32017-11-09 19:30:32 +000044 android-support-test \
45 mockito-robolectric-prebuilt \
46 platform-test-annotations \
Bernardo Rufino24476872017-12-21 11:43:16 +000047 truth-prebuilt \
48 testng
Artem Iglikov5ed1dab2017-05-25 15:56:05 +010049
50LOCAL_JAVA_LIBRARIES := \
51 junit \
Bernardo Rufino90a88022017-11-13 17:19:15 +000052 platform-robolectric-3.5.1-prebuilt
Artem Iglikov5ed1dab2017-05-25 15:56:05 +010053
54LOCAL_INSTRUMENTATION_FOR := FrameworksServicesLib
55LOCAL_MODULE := FrameworksServicesRoboTests
56
57LOCAL_MODULE_TAGS := optional
58
59include $(BUILD_STATIC_JAVA_LIBRARY)
60
61#############################################################
62# FrameworksServices runner target to run the previous target. #
63#############################################################
64include $(CLEAR_VARS)
65
66LOCAL_MODULE := RunFrameworksServicesRoboTests
67
68LOCAL_SDK_VERSION := current
69
70LOCAL_STATIC_JAVA_LIBRARIES := \
71 FrameworksServicesRoboTests
72
73LOCAL_TEST_PACKAGE := FrameworksServicesLib
74
Artem Iglikovbd476ea2017-09-01 10:57:26 +010075LOCAL_INSTRUMENT_SOURCE_DIRS := $(dir $(LOCAL_PATH))backup/java
76
Bernardo Rufino90a88022017-11-13 17:19:15 +000077include prebuilts/misc/common/robolectric/3.5.1/run_robotests.mk