| 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 |
| Alan Stokes | 8d3b7a4 | 2019-02-19 17:14:42 +0000 | [diff] [blame] | 24 | LOCAL_MODULE := DynamicCodeLoggerTestLibrary |
| Bob Badour | 8a6a2bc | 2021-02-12 17:07:05 -0800 | [diff] [blame] | 25 | LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 |
| 26 | LOCAL_LICENSE_CONDITIONS := notice |
| 27 | LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../NOTICE |
| Alan Stokes | 761d618 | 2017-12-19 11:48:19 +0000 | [diff] [blame] | 28 | LOCAL_SRC_FILES := $(call all-java-files-under, src/com/android/dcl) |
| 29 | |
| 30 | include $(BUILD_JAVA_LIBRARY) |
| 31 | |
| Alan Stokes | 8d3b7a4 | 2019-02-19 17:14:42 +0000 | [diff] [blame] | 32 | dynamiccodeloggertest_jar := $(LOCAL_BUILT_MODULE) |
| Alan Stokes | 761d618 | 2017-12-19 11:48:19 +0000 | [diff] [blame] | 33 | |
| 34 | |
| Alan Stokes | e9d3314 | 2018-12-19 09:31:21 +0000 | [diff] [blame] | 35 | # Also build a native library that the test app can dynamically load |
| 36 | |
| 37 | include $(CLEAR_VARS) |
| 38 | |
| 39 | LOCAL_MODULE_TAGS := tests |
| Alan Stokes | 8d3b7a4 | 2019-02-19 17:14:42 +0000 | [diff] [blame] | 40 | LOCAL_MODULE := DynamicCodeLoggerNativeTestLibrary |
| Bob Badour | 8a6a2bc | 2021-02-12 17:07:05 -0800 | [diff] [blame] | 41 | LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 |
| 42 | LOCAL_LICENSE_CONDITIONS := notice |
| 43 | LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../NOTICE |
| Alan Stokes | e9d3314 | 2018-12-19 09:31:21 +0000 | [diff] [blame] | 44 | LOCAL_SRC_FILES := src/cpp/com_android_dcl_Jni.cpp |
| Orion Hodson | 3eba1ab | 2020-07-02 13:50:33 +0100 | [diff] [blame] | 45 | LOCAL_HEADER_LIBRARIES := jni_headers |
| Alan Stokes | e9d3314 | 2018-12-19 09:31:21 +0000 | [diff] [blame] | 46 | LOCAL_SDK_VERSION := 28 |
| 47 | LOCAL_NDK_STL_VARIANT := c++_static |
| 48 | |
| 49 | include $(BUILD_SHARED_LIBRARY) |
| 50 | |
| Alan Stokes | e9d3314 | 2018-12-19 09:31:21 +0000 | [diff] [blame] | 51 | # And a standalone native executable that we can exec. |
| 52 | |
| 53 | include $(CLEAR_VARS) |
| 54 | |
| 55 | LOCAL_MODULE_TAGS := tests |
| Alan Stokes | 8d3b7a4 | 2019-02-19 17:14:42 +0000 | [diff] [blame] | 56 | LOCAL_MODULE := DynamicCodeLoggerNativeExecutable |
| Bob Badour | 8a6a2bc | 2021-02-12 17:07:05 -0800 | [diff] [blame] | 57 | LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 |
| 58 | LOCAL_LICENSE_CONDITIONS := notice |
| 59 | LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../NOTICE |
| Alan Stokes | e9d3314 | 2018-12-19 09:31:21 +0000 | [diff] [blame] | 60 | LOCAL_SRC_FILES := src/cpp/test_executable.cpp |
| 61 | |
| 62 | include $(BUILD_EXECUTABLE) |
| 63 | |
| Alan Stokes | 8d3b7a4 | 2019-02-19 17:14:42 +0000 | [diff] [blame] | 64 | dynamiccodeloggertest_executable := $(LOCAL_BUILT_MODULE) |
| Alan Stokes | e9d3314 | 2018-12-19 09:31:21 +0000 | [diff] [blame] | 65 | |
| Alan Stokes | 761d618 | 2017-12-19 11:48:19 +0000 | [diff] [blame] | 66 | # Build the test app itself |
| 67 | |
| 68 | include $(CLEAR_VARS) |
| 69 | |
| 70 | LOCAL_MODULE_TAGS := tests |
| Alan Stokes | 8d3b7a4 | 2019-02-19 17:14:42 +0000 | [diff] [blame] | 71 | LOCAL_PACKAGE_NAME := DynamicCodeLoggerIntegrationTests |
| Anton Hansson | ab6ec61 | 2018-02-23 12:57:51 +0000 | [diff] [blame] | 72 | LOCAL_SDK_VERSION := current |
| Alan Stokes | 761d618 | 2017-12-19 11:48:19 +0000 | [diff] [blame] | 73 | LOCAL_COMPATIBILITY_SUITE := device-tests |
| Alan Stokes | e9d3314 | 2018-12-19 09:31:21 +0000 | [diff] [blame] | 74 | LOCAL_CERTIFICATE := shared |
| Alan Stokes | 761d618 | 2017-12-19 11:48:19 +0000 | [diff] [blame] | 75 | LOCAL_SRC_FILES := $(call all-java-files-under, src/com/android/server/pm) |
| 76 | |
| 77 | LOCAL_STATIC_JAVA_LIBRARIES := \ |
| Brett Chabot | 502ec7a | 2019-03-01 14:43:20 -0800 | [diff] [blame] | 78 | androidx.test.rules \ |
| Alan Stokes | 761d618 | 2017-12-19 11:48:19 +0000 | [diff] [blame] | 79 | truth-prebuilt \ |
| 80 | |
| Alan Stokes | a303953 | 2019-01-25 14:07:23 +0000 | [diff] [blame] | 81 | # Include both versions of the .so if we have 2 arch |
| 82 | LOCAL_MULTILIB := both |
| 83 | LOCAL_JNI_SHARED_LIBRARIES := \ |
| Alan Stokes | 8d3b7a4 | 2019-02-19 17:14:42 +0000 | [diff] [blame] | 84 | DynamicCodeLoggerNativeTestLibrary \ |
| Alan Stokes | a303953 | 2019-01-25 14:07:23 +0000 | [diff] [blame] | 85 | |
| Alan Stokes | 8d3b7a4 | 2019-02-19 17:14:42 +0000 | [diff] [blame] | 86 | # This gets us the javalib.jar built by DynamicCodeLoggerTestLibrary above as well as the various |
| Alan Stokes | e9d3314 | 2018-12-19 09:31:21 +0000 | [diff] [blame] | 87 | # native binaries. |
| 88 | LOCAL_JAVA_RESOURCE_FILES := \ |
| Alan Stokes | 8d3b7a4 | 2019-02-19 17:14:42 +0000 | [diff] [blame] | 89 | $(dynamiccodeloggertest_jar) \ |
| 90 | $(dynamiccodeloggertest_executable) \ |
| Alan Stokes | 761d618 | 2017-12-19 11:48:19 +0000 | [diff] [blame] | 91 | |
| 92 | include $(BUILD_PACKAGE) |