blob: 0cf0d3402dea74e32b91a853bc194971243960fb [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
James Lemieux38d86c22018-10-30 16:50:39 -070015###################################################################
16# FrameworksServicesLib app just for Robolectric test target #
17###################################################################
Artem Iglikov5ed1dab2017-05-25 15:56:05 +010018LOCAL_PATH := $(call my-dir)
19
20include $(CLEAR_VARS)
21
22LOCAL_PACKAGE_NAME := FrameworksServicesLib
Anton Hanssond137c872018-02-23 12:57:51 +000023LOCAL_PRIVATE_PLATFORM_APIS := true
Artem Iglikov5ed1dab2017-05-25 15:56:05 +010024LOCAL_MODULE_TAGS := optional
25
26LOCAL_PRIVILEGED_MODULE := true
27
28LOCAL_STATIC_JAVA_LIBRARIES := \
Dan Shidc2b6312018-11-12 17:17:17 -080029 services.core \
30 services.net
Artem Iglikov5ed1dab2017-05-25 15:56:05 +010031
32include $(BUILD_PACKAGE)
33
James Lemieux38d86c22018-10-30 16:50:39 -070034###################################################################
35# FrameworksServicesLib Robolectric test target. #
36###################################################################
Artem Iglikov5ed1dab2017-05-25 15:56:05 +010037include $(CLEAR_VARS)
38
James Lemieux38d86c22018-10-30 16:50:39 -070039LOCAL_MODULE := FrameworksServicesRoboTests
Artem Iglikov5ed1dab2017-05-25 15:56:05 +010040
Chandan Nath242c7b52019-01-11 19:58:23 +000041LOCAL_SRC_FILES := $(call all-java-files-under, src)
Robert Berry39194c02018-01-11 13:50:56 +000042
James Lemieux38d86c22018-10-30 16:50:39 -070043LOCAL_RESOURCE_DIR := \
44 $(LOCAL_PATH)/res
Robert Berry39194c02018-01-11 13:50:56 +000045
James Lemieux38d86c22018-10-30 16:50:39 -070046LOCAL_JAVA_RESOURCE_DIRS := config
Robert Berry39194c02018-01-11 13:50:56 +000047
James Lemieux38d86c22018-10-30 16:50:39 -070048# Include the testing libraries
49LOCAL_JAVA_LIBRARIES := \
Bernardo Rufino58dd6c32017-11-09 19:30:32 +000050 platform-test-annotations \
James Lemieux38d86c22018-10-30 16:50:39 -070051 robolectric_android-all-stub \
52 Robolectric_all-target \
53 mockito-robolectric-prebuilt \
Bernardo Rufino24476872017-12-21 11:43:16 +000054 truth-prebuilt \
55 testng
Artem Iglikov5ed1dab2017-05-25 15:56:05 +010056
Artem Iglikov5ed1dab2017-05-25 15:56:05 +010057LOCAL_INSTRUMENTATION_FOR := FrameworksServicesLib
Artem Iglikov5ed1dab2017-05-25 15:56:05 +010058
59LOCAL_MODULE_TAGS := optional
60
61include $(BUILD_STATIC_JAVA_LIBRARY)
62
James Lemieux38d86c22018-10-30 16:50:39 -070063###################################################################
64# FrameworksServicesLib runner target to run the previous target. #
65###################################################################
Artem Iglikov5ed1dab2017-05-25 15:56:05 +010066include $(CLEAR_VARS)
67
68LOCAL_MODULE := RunFrameworksServicesRoboTests
69
James Lemieux38d86c22018-10-30 16:50:39 -070070LOCAL_JAVA_LIBRARIES := \
71 FrameworksServicesRoboTests \
72 platform-test-annotations \
73 robolectric_android-all-stub \
74 Robolectric_all-target \
75 mockito-robolectric-prebuilt \
76 truth-prebuilt \
77 testng
Artem Iglikov5ed1dab2017-05-25 15:56:05 +010078
79LOCAL_TEST_PACKAGE := FrameworksServicesLib
80
Chandan Nath242c7b52019-01-11 19:58:23 +000081LOCAL_ROBOTEST_FILES := $(call find-files-in-subdirs,$(LOCAL_PATH)/src,*Test.java,.)
Chandan Nathdae228b2018-12-11 18:55:44 +000082
83include external/robolectric-shadows/run_robotests.mk
84
85###################################################################
86# include subdir Android.mk files
87###################################################################
88include $(CLEAR_VARS)
89include $(call all-makefiles-under,$(LOCAL_PATH))