blob: 979d13ac940592523ae977789193bdda601713bb [file] [log] [blame]
Alan Stokes761d6182017-12-19 11:48:19 +00001#
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
17LOCAL_PATH:= $(call my-dir)
18
19# Build a tiny library that the test app can dynamically load
20
21include $(CLEAR_VARS)
22
23LOCAL_MODULE_TAGS := tests
24LOCAL_MODULE := DexLoggerTestLibrary
25LOCAL_SRC_FILES := $(call all-java-files-under, src/com/android/dcl)
26
27include $(BUILD_JAVA_LIBRARY)
28
29dexloggertest_jar := $(LOCAL_BUILT_MODULE)
30
31
Alan Stokese9d33142018-12-19 09:31:21 +000032# Also build a native library that the test app can dynamically load
33
34include $(CLEAR_VARS)
35
36LOCAL_MODULE_TAGS := tests
37LOCAL_MODULE := DexLoggerNativeTestLibrary
38LOCAL_MULTILIB := first
39LOCAL_SRC_FILES := src/cpp/com_android_dcl_Jni.cpp
40LOCAL_C_INCLUDES += \
41 $(JNI_H_INCLUDE)
42LOCAL_SDK_VERSION := 28
43LOCAL_NDK_STL_VARIANT := c++_static
44
45include $(BUILD_SHARED_LIBRARY)
46
47dexloggertest_so := $(LOCAL_BUILT_MODULE)
48
49# And a standalone native executable that we can exec.
50
51include $(CLEAR_VARS)
52
53LOCAL_MODULE_TAGS := tests
54LOCAL_MODULE := DexLoggerNativeExecutable
55LOCAL_SRC_FILES := src/cpp/test_executable.cpp
56
57include $(BUILD_EXECUTABLE)
58
59dexloggertest_executable := $(LOCAL_BUILT_MODULE)
60
Alan Stokes761d6182017-12-19 11:48:19 +000061# Build the test app itself
62
63include $(CLEAR_VARS)
64
65LOCAL_MODULE_TAGS := tests
66LOCAL_PACKAGE_NAME := DexLoggerIntegrationTests
Anton Hanssonab6ec612018-02-23 12:57:51 +000067LOCAL_SDK_VERSION := current
Alan Stokes761d6182017-12-19 11:48:19 +000068LOCAL_COMPATIBILITY_SUITE := device-tests
Alan Stokese9d33142018-12-19 09:31:21 +000069LOCAL_CERTIFICATE := shared
Alan Stokes761d6182017-12-19 11:48:19 +000070LOCAL_SRC_FILES := $(call all-java-files-under, src/com/android/server/pm)
71
72LOCAL_STATIC_JAVA_LIBRARIES := \
73 android-support-test \
74 truth-prebuilt \
75
Alan Stokese9d33142018-12-19 09:31:21 +000076# This gets us the javalib.jar built by DexLoggerTestLibrary above as well as the various
77# native binaries.
78LOCAL_JAVA_RESOURCE_FILES := \
79 $(dexloggertest_jar) \
80 $(dexloggertest_so) \
81 $(dexloggertest_executable)
Alan Stokes761d6182017-12-19 11:48:19 +000082
83include $(BUILD_PACKAGE)