Alan Stokes | 761d618 | 2017-12-19 11:48:19 +0000 | [diff] [blame] | 1 | # |
| 2 | # Copyright 2017 The Android Open Source Project |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | # |
| 16 | |
| 17 | LOCAL_PATH:= $(call my-dir) |
| 18 | |
| 19 | # Build a tiny library that the test app can dynamically load |
| 20 | |
| 21 | include $(CLEAR_VARS) |
| 22 | |
| 23 | LOCAL_MODULE_TAGS := tests |
| 24 | LOCAL_MODULE := DexLoggerTestLibrary |
| 25 | LOCAL_SRC_FILES := $(call all-java-files-under, src/com/android/dcl) |
| 26 | |
| 27 | include $(BUILD_JAVA_LIBRARY) |
| 28 | |
| 29 | dexloggertest_jar := $(LOCAL_BUILT_MODULE) |
| 30 | |
| 31 | |
Alan Stokes | e9d3314 | 2018-12-19 09:31:21 +0000 | [diff] [blame] | 32 | # Also build a native library that the test app can dynamically load |
| 33 | |
| 34 | include $(CLEAR_VARS) |
| 35 | |
| 36 | LOCAL_MODULE_TAGS := tests |
| 37 | LOCAL_MODULE := DexLoggerNativeTestLibrary |
Alan Stokes | e9d3314 | 2018-12-19 09:31:21 +0000 | [diff] [blame] | 38 | LOCAL_SRC_FILES := src/cpp/com_android_dcl_Jni.cpp |
| 39 | LOCAL_C_INCLUDES += \ |
| 40 | $(JNI_H_INCLUDE) |
| 41 | LOCAL_SDK_VERSION := 28 |
| 42 | LOCAL_NDK_STL_VARIANT := c++_static |
| 43 | |
| 44 | include $(BUILD_SHARED_LIBRARY) |
| 45 | |
Alan Stokes | e9d3314 | 2018-12-19 09:31:21 +0000 | [diff] [blame] | 46 | # And a standalone native executable that we can exec. |
| 47 | |
| 48 | include $(CLEAR_VARS) |
| 49 | |
| 50 | LOCAL_MODULE_TAGS := tests |
| 51 | LOCAL_MODULE := DexLoggerNativeExecutable |
| 52 | LOCAL_SRC_FILES := src/cpp/test_executable.cpp |
| 53 | |
| 54 | include $(BUILD_EXECUTABLE) |
| 55 | |
| 56 | dexloggertest_executable := $(LOCAL_BUILT_MODULE) |
| 57 | |
Alan Stokes | 761d618 | 2017-12-19 11:48:19 +0000 | [diff] [blame] | 58 | # Build the test app itself |
| 59 | |
| 60 | include $(CLEAR_VARS) |
| 61 | |
| 62 | LOCAL_MODULE_TAGS := tests |
| 63 | LOCAL_PACKAGE_NAME := DexLoggerIntegrationTests |
Anton Hansson | ab6ec61 | 2018-02-23 12:57:51 +0000 | [diff] [blame] | 64 | LOCAL_SDK_VERSION := current |
Alan Stokes | 761d618 | 2017-12-19 11:48:19 +0000 | [diff] [blame] | 65 | LOCAL_COMPATIBILITY_SUITE := device-tests |
Alan Stokes | e9d3314 | 2018-12-19 09:31:21 +0000 | [diff] [blame] | 66 | LOCAL_CERTIFICATE := shared |
Alan Stokes | 761d618 | 2017-12-19 11:48:19 +0000 | [diff] [blame] | 67 | LOCAL_SRC_FILES := $(call all-java-files-under, src/com/android/server/pm) |
| 68 | |
| 69 | LOCAL_STATIC_JAVA_LIBRARIES := \ |
| 70 | android-support-test \ |
| 71 | truth-prebuilt \ |
| 72 | |
Alan Stokes | a303953 | 2019-01-25 14:07:23 +0000 | [diff] [blame] | 73 | # Include both versions of the .so if we have 2 arch |
| 74 | LOCAL_MULTILIB := both |
| 75 | LOCAL_JNI_SHARED_LIBRARIES := \ |
| 76 | DexLoggerNativeTestLibrary \ |
| 77 | |
Alan Stokes | e9d3314 | 2018-12-19 09:31:21 +0000 | [diff] [blame] | 78 | # This gets us the javalib.jar built by DexLoggerTestLibrary above as well as the various |
| 79 | # native binaries. |
| 80 | LOCAL_JAVA_RESOURCE_FILES := \ |
| 81 | $(dexloggertest_jar) \ |
Alan Stokes | a303953 | 2019-01-25 14:07:23 +0000 | [diff] [blame] | 82 | $(dexloggertest_executable) \ |
Alan Stokes | 761d618 | 2017-12-19 11:48:19 +0000 | [diff] [blame] | 83 | |
| 84 | include $(BUILD_PACKAGE) |