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 LOCAL_PATH := $(call my-dir) 16 17 ################################################################### 18 # BackupFrameworksServicesLib app just for Robolectric test target # 19 ################################################################### 20 include $(CLEAR_VARS) 21 22 LOCAL_PACKAGE_NAME := BackupFrameworksServicesLib 23 LOCAL_PRIVATE_PLATFORM_APIS := true 24 LOCAL_MODULE_TAGS := optional 25 26 LOCAL_PRIVILEGED_MODULE := true 27 28 LOCAL_STATIC_JAVA_LIBRARIES := \ 29 bmgr \ 30 bu \ 31 services.backup \ 32 services.core \ 33 services.net 34 35 include $(BUILD_PACKAGE) 36 37 ################################################################### 38 # BackupFrameworksServicesLib Robolectric test target. # 39 ################################################################### 40 include $(CLEAR_VARS) 41 42 LOCAL_MODULE := BackupFrameworksServicesRoboTests 43 44 LOCAL_SRC_FILES := $(call all-java-files-under, src) \ 45 $(call all-java-files-under, ../src/com/android/server/testing/shadows) 46 47 LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res 48 49 LOCAL_JAVA_RESOURCE_DIRS := config 50 51 # Include the testing libraries 52 LOCAL_JAVA_LIBRARIES := \ 53 platform-test-annotations \ 54 robolectric_android-all-stub \ 55 Robolectric_all-target \ 56 mockito-robolectric-prebuilt \ 57 truth-prebuilt \ 58 testng 59 60 LOCAL_INSTRUMENTATION_FOR := BackupFrameworksServicesLib 61 62 LOCAL_MODULE_TAGS := optional 63 64 include $(BUILD_STATIC_JAVA_LIBRARY) 65 66 ################################################################### 67 # BackupFrameworksServicesLib runner target to run the previous target. # 68 ################################################################### 69 include $(CLEAR_VARS) 70 71 LOCAL_MODULE := RunBackupFrameworksServicesRoboTests 72 73 LOCAL_JAVA_LIBRARIES := \ 74 BackupFrameworksServicesRoboTests \ 75 platform-test-annotations \ 76 robolectric_android-all-stub \ 77 Robolectric_all-target \ 78 mockito-robolectric-prebuilt \ 79 truth-prebuilt \ 80 testng 81 82 LOCAL_TEST_PACKAGE := BackupFrameworksServicesLib 83 84 include external/robolectric-shadows/run_robotests.mk 85