Merge "Convert frameworks/base/services/tests to Android.bp"
This commit is contained in:
44
services/tests/mockingservicestests/Android.bp
Normal file
44
services/tests/mockingservicestests/Android.bp
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
// Copyright (C) 2018 The Android Open Source Project
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
android_test {
|
||||||
|
name: "FrameworksMockingServicesTests",
|
||||||
|
|
||||||
|
srcs: ["src/**/*.java"],
|
||||||
|
|
||||||
|
static_libs: [
|
||||||
|
"services.core",
|
||||||
|
"services.devicepolicy",
|
||||||
|
"frameworks-base-testutils",
|
||||||
|
"androidx.test.runner",
|
||||||
|
"mockito-target-extended-minus-junit4",
|
||||||
|
"ShortcutManagerTestUtils",
|
||||||
|
"compatibility-device-util",
|
||||||
|
"truth-prebuilt",
|
||||||
|
],
|
||||||
|
|
||||||
|
libs: ["android.test.mock"],
|
||||||
|
|
||||||
|
jni_libs: [
|
||||||
|
"libdexmakerjvmtiagent",
|
||||||
|
"libstaticjvmtiagent",
|
||||||
|
],
|
||||||
|
|
||||||
|
platform_apis: true,
|
||||||
|
test_suites: ["device-tests"],
|
||||||
|
|
||||||
|
optimize: {
|
||||||
|
enabled: false,
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
# Copyright (C) 2018 The Android Open Source Project
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
|
|
||||||
LOCAL_PATH:= $(call my-dir)
|
|
||||||
include $(CLEAR_VARS)
|
|
||||||
|
|
||||||
LOCAL_MODULE_TAGS := tests
|
|
||||||
|
|
||||||
LOCAL_SRC_FILES := $(call all-java-files-under, src)
|
|
||||||
|
|
||||||
LOCAL_STATIC_JAVA_LIBRARIES := \
|
|
||||||
services.core \
|
|
||||||
services.devicepolicy \
|
|
||||||
frameworks-base-testutils \
|
|
||||||
androidx.test.runner \
|
|
||||||
mockito-target-extended-minus-junit4 \
|
|
||||||
ShortcutManagerTestUtils \
|
|
||||||
compatibility-device-util \
|
|
||||||
truth-prebuilt
|
|
||||||
|
|
||||||
LOCAL_JAVA_LIBRARIES := \
|
|
||||||
android.test.mock
|
|
||||||
|
|
||||||
LOCAL_JNI_SHARED_LIBRARIES := \
|
|
||||||
libdexmakerjvmtiagent \
|
|
||||||
libstaticjvmtiagent
|
|
||||||
|
|
||||||
LOCAL_PACKAGE_NAME := FrameworksMockingServicesTests
|
|
||||||
LOCAL_PRIVATE_PLATFORM_APIS := true
|
|
||||||
LOCAL_COMPATIBILITY_SUITE := device-tests
|
|
||||||
|
|
||||||
LOCAL_PROGUARD_ENABLED := disabled
|
|
||||||
|
|
||||||
include $(BUILD_PACKAGE)
|
|
||||||
101
services/tests/servicestests/Android.bp
Normal file
101
services/tests/servicestests/Android.bp
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
//########################################################################
|
||||||
|
// Build FrameworksServicesTests package
|
||||||
|
//########################################################################
|
||||||
|
|
||||||
|
android_test {
|
||||||
|
name: "FrameworksServicesTests",
|
||||||
|
|
||||||
|
// Include all test java files.
|
||||||
|
srcs: [
|
||||||
|
"src/**/*.java",
|
||||||
|
|
||||||
|
"aidl/com/android/servicestests/aidl/INetworkStateObserver.aidl",
|
||||||
|
"aidl/com/android/servicestests/aidl/ICmdReceiverService.aidl",
|
||||||
|
|
||||||
|
"test-apps/JobTestApp/src/**/*.java",
|
||||||
|
|
||||||
|
"test-apps/SuspendTestApp/src/**/*.java",
|
||||||
|
],
|
||||||
|
static_libs: [
|
||||||
|
"frameworks-base-testutils",
|
||||||
|
"services.accessibility",
|
||||||
|
"services.appwidget",
|
||||||
|
"services.autofill",
|
||||||
|
"services.backup",
|
||||||
|
"services.core",
|
||||||
|
"services.devicepolicy",
|
||||||
|
"services.net",
|
||||||
|
"services.usage",
|
||||||
|
"guava",
|
||||||
|
"android-support-test",
|
||||||
|
"mockito-target-minus-junit4",
|
||||||
|
"platform-test-annotations",
|
||||||
|
"ShortcutManagerTestUtils",
|
||||||
|
"truth-prebuilt",
|
||||||
|
"testables",
|
||||||
|
"testng",
|
||||||
|
"ub-uiautomator",
|
||||||
|
"platformprotosnano",
|
||||||
|
"servicestests-utils",
|
||||||
|
],
|
||||||
|
|
||||||
|
aidl: {
|
||||||
|
local_include_dirs: ["aidl"],
|
||||||
|
},
|
||||||
|
|
||||||
|
libs: [
|
||||||
|
"android.hidl.manager-V1.0-java",
|
||||||
|
"android.test.mock",
|
||||||
|
"android.test.base",
|
||||||
|
"android.test.runner",
|
||||||
|
],
|
||||||
|
|
||||||
|
platform_apis: true,
|
||||||
|
test_suites: ["device-tests"],
|
||||||
|
|
||||||
|
certificate: "platform",
|
||||||
|
|
||||||
|
// These are not normally accessible from apps so they must be explicitly included.
|
||||||
|
jni_libs: [
|
||||||
|
"libbacktrace",
|
||||||
|
"libbase",
|
||||||
|
"libbinder",
|
||||||
|
"libbinderthreadstate",
|
||||||
|
"libc++",
|
||||||
|
"libcutils",
|
||||||
|
"liblog",
|
||||||
|
"liblzma",
|
||||||
|
"libnativehelper",
|
||||||
|
"libnetdaidl",
|
||||||
|
"libui",
|
||||||
|
"libunwind",
|
||||||
|
"libutils",
|
||||||
|
],
|
||||||
|
|
||||||
|
dxflags: ["--multi-dex"],
|
||||||
|
|
||||||
|
optimize: {
|
||||||
|
enabled: false,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
java_library {
|
||||||
|
name: "servicestests-utils",
|
||||||
|
srcs: [
|
||||||
|
"utils/**/*.java",
|
||||||
|
],
|
||||||
|
static_libs: [
|
||||||
|
"android-support-test",
|
||||||
|
"mockito-target-minus-junit4",
|
||||||
|
],
|
||||||
|
libs: [
|
||||||
|
"android.test.runner",
|
||||||
|
],
|
||||||
|
}
|
||||||
|
|
||||||
|
filegroup {
|
||||||
|
name: "servicestests-SuspendTestApp-files",
|
||||||
|
srcs: [
|
||||||
|
"src/com/android/server/pm/SuspendPackagesTest.java",
|
||||||
|
],
|
||||||
|
}
|
||||||
@@ -1,80 +0,0 @@
|
|||||||
#########################################################################
|
|
||||||
# Build FrameworksServicesTests package
|
|
||||||
#########################################################################
|
|
||||||
|
|
||||||
LOCAL_PATH:= $(call my-dir)
|
|
||||||
include $(CLEAR_VARS)
|
|
||||||
|
|
||||||
# We only want this apk build for tests.
|
|
||||||
LOCAL_MODULE_TAGS := tests
|
|
||||||
|
|
||||||
# Include all test java files.
|
|
||||||
LOCAL_SRC_FILES := \
|
|
||||||
$(call all-java-files-under, src) \
|
|
||||||
$(call all-java-files-under, utils) \
|
|
||||||
|
|
||||||
LOCAL_STATIC_JAVA_LIBRARIES := \
|
|
||||||
frameworks-base-testutils \
|
|
||||||
services.accessibility \
|
|
||||||
services.appwidget \
|
|
||||||
services.autofill \
|
|
||||||
services.backup \
|
|
||||||
services.core \
|
|
||||||
services.devicepolicy \
|
|
||||||
services.net \
|
|
||||||
services.usage \
|
|
||||||
guava \
|
|
||||||
android-support-test \
|
|
||||||
mockito-target-minus-junit4 \
|
|
||||||
platform-test-annotations \
|
|
||||||
ShortcutManagerTestUtils \
|
|
||||||
truth-prebuilt \
|
|
||||||
testables \
|
|
||||||
testng \
|
|
||||||
ub-uiautomator\
|
|
||||||
platformprotosnano
|
|
||||||
|
|
||||||
LOCAL_AIDL_INCLUDES := $(LOCAL_PATH)/aidl
|
|
||||||
|
|
||||||
LOCAL_SRC_FILES += aidl/com/android/servicestests/aidl/INetworkStateObserver.aidl \
|
|
||||||
aidl/com/android/servicestests/aidl/ICmdReceiverService.aidl
|
|
||||||
LOCAL_SRC_FILES += $(call all-java-files-under, test-apps/JobTestApp/src)
|
|
||||||
LOCAL_SRC_FILES += $(call all-java-files-under, test-apps/SuspendTestApp/src)
|
|
||||||
|
|
||||||
LOCAL_JAVA_LIBRARIES := \
|
|
||||||
android.hidl.manager-V1.0-java \
|
|
||||||
android.test.mock \
|
|
||||||
android.test.base android.test.runner \
|
|
||||||
|
|
||||||
LOCAL_PACKAGE_NAME := FrameworksServicesTests
|
|
||||||
LOCAL_PRIVATE_PLATFORM_APIS := true
|
|
||||||
LOCAL_COMPATIBILITY_SUITE := device-tests
|
|
||||||
|
|
||||||
LOCAL_CERTIFICATE := platform
|
|
||||||
|
|
||||||
# These are not normally accessible from apps so they must be explicitly included.
|
|
||||||
LOCAL_JNI_SHARED_LIBRARIES := \
|
|
||||||
libbacktrace \
|
|
||||||
libbase \
|
|
||||||
libbinder \
|
|
||||||
libbinderthreadstate \
|
|
||||||
libc++ \
|
|
||||||
libcutils \
|
|
||||||
liblog \
|
|
||||||
liblzma \
|
|
||||||
libnativehelper \
|
|
||||||
libnetdaidl \
|
|
||||||
libui \
|
|
||||||
libunwind \
|
|
||||||
libutils
|
|
||||||
|
|
||||||
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
|
|
||||||
|
|
||||||
LOCAL_JACK_FLAGS := --multi-dex native
|
|
||||||
LOCAL_DX_FLAGS := --multi-dex
|
|
||||||
|
|
||||||
LOCAL_PROGUARD_ENABLED := disabled
|
|
||||||
|
|
||||||
include $(BUILD_PACKAGE)
|
|
||||||
|
|
||||||
include $(call all-makefiles-under, $(LOCAL_PATH))
|
|
||||||
22
services/tests/servicestests/aidl/Android.bp
Normal file
22
services/tests/servicestests/aidl/Android.bp
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
// Copyright (C) 2017 The Android Open Source Project
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
java_library {
|
||||||
|
name: "servicestests-aidl",
|
||||||
|
sdk_version: "current",
|
||||||
|
srcs: [
|
||||||
|
"com/android/servicestests/aidl/INetworkStateObserver.aidl",
|
||||||
|
"com/android/servicestests/aidl/ICmdReceiverService.aidl",
|
||||||
|
],
|
||||||
|
}
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
# Copyright (C) 2017 The Android Open Source Project
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
|
|
||||||
LOCAL_PATH := $(call my-dir)
|
|
||||||
|
|
||||||
include $(CLEAR_VARS)
|
|
||||||
LOCAL_MODULE_TAGS := tests
|
|
||||||
LOCAL_SDK_VERSION := current
|
|
||||||
LOCAL_SRC_FILES := \
|
|
||||||
com/android/servicestests/aidl/INetworkStateObserver.aidl \
|
|
||||||
com/android/servicestests/aidl/ICmdReceiverService.aidl
|
|
||||||
LOCAL_MODULE := servicestests-aidl
|
|
||||||
include $(BUILD_STATIC_JAVA_LIBRARY)
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
include $(call all-subdir-makefiles)
|
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
// Copyright (C) 2017 The Android Open Source Project
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
android_test_helper_app {
|
||||||
|
name: "ConnTestApp",
|
||||||
|
|
||||||
|
test_suites: ["device-tests"],
|
||||||
|
|
||||||
|
static_libs: ["servicestests-aidl"],
|
||||||
|
srcs: ["**/*.java"],
|
||||||
|
|
||||||
|
platform_apis: true,
|
||||||
|
certificate: "platform",
|
||||||
|
dex_preopt: {
|
||||||
|
enabled: false,
|
||||||
|
},
|
||||||
|
optimize: {
|
||||||
|
enabled: false,
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
# Copyright (C) 2017 The Android Open Source Project
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
|
|
||||||
LOCAL_PATH:= $(call my-dir)
|
|
||||||
|
|
||||||
include $(CLEAR_VARS)
|
|
||||||
|
|
||||||
LOCAL_MODULE_TAGS := tests
|
|
||||||
|
|
||||||
LOCAL_COMPATIBILITY_SUITE := device-tests
|
|
||||||
|
|
||||||
LOCAL_STATIC_JAVA_LIBRARIES := servicestests-aidl
|
|
||||||
LOCAL_SRC_FILES := $(call all-subdir-java-files)
|
|
||||||
|
|
||||||
LOCAL_PACKAGE_NAME := ConnTestApp
|
|
||||||
LOCAL_PRIVATE_PLATFORM_APIS := true
|
|
||||||
LOCAL_CERTIFICATE := platform
|
|
||||||
LOCAL_DEX_PREOPT := false
|
|
||||||
LOCAL_PROGUARD_ENABLED := disabled
|
|
||||||
|
|
||||||
include $(BUILD_PACKAGE)
|
|
||||||
30
services/tests/servicestests/test-apps/JobTestApp/Android.bp
Normal file
30
services/tests/servicestests/test-apps/JobTestApp/Android.bp
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
// Copyright (C) 2017 The Android Open Source Project
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
android_test_helper_app {
|
||||||
|
name: "JobTestApp",
|
||||||
|
|
||||||
|
sdk_version: "current",
|
||||||
|
|
||||||
|
test_suites: ["device-tests"],
|
||||||
|
|
||||||
|
srcs: ["**/*.java"],
|
||||||
|
|
||||||
|
dex_preopt: {
|
||||||
|
enabled: false,
|
||||||
|
},
|
||||||
|
optimize: {
|
||||||
|
enabled: false,
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
# Copyright (C) 2017 The Android Open Source Project
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
|
|
||||||
LOCAL_PATH:= $(call my-dir)
|
|
||||||
|
|
||||||
include $(CLEAR_VARS)
|
|
||||||
|
|
||||||
LOCAL_MODULE_TAGS := tests
|
|
||||||
LOCAL_SDK_VERSION := current
|
|
||||||
|
|
||||||
LOCAL_COMPATIBILITY_SUITE := device-tests
|
|
||||||
|
|
||||||
LOCAL_SRC_FILES := $(call all-subdir-java-files)
|
|
||||||
|
|
||||||
LOCAL_PACKAGE_NAME := JobTestApp
|
|
||||||
LOCAL_DEX_PREOPT := false
|
|
||||||
LOCAL_PROGUARD_ENABLED := disabled
|
|
||||||
|
|
||||||
include $(BUILD_PACKAGE)
|
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
// Copyright (C) 2018 The Android Open Source Project
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
android_test_helper_app {
|
||||||
|
name: "SuspendTestApp",
|
||||||
|
|
||||||
|
test_suites: ["device-tests"],
|
||||||
|
|
||||||
|
static_libs: [
|
||||||
|
"android-support-test",
|
||||||
|
"ub-uiautomator",
|
||||||
|
],
|
||||||
|
|
||||||
|
srcs: [
|
||||||
|
"**/*.java",
|
||||||
|
":servicestests-SuspendTestApp-files",
|
||||||
|
],
|
||||||
|
|
||||||
|
dex_preopt: {
|
||||||
|
enabled: false,
|
||||||
|
},
|
||||||
|
optimize: {
|
||||||
|
enabled: false,
|
||||||
|
},
|
||||||
|
|
||||||
|
platform_apis: true,
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
# Copyright (C) 2018 The Android Open Source Project
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
|
|
||||||
LOCAL_PATH:= $(call my-dir)
|
|
||||||
|
|
||||||
include $(CLEAR_VARS)
|
|
||||||
|
|
||||||
LOCAL_MODULE_TAGS := tests
|
|
||||||
|
|
||||||
LOCAL_COMPATIBILITY_SUITE := device-tests
|
|
||||||
|
|
||||||
LOCAL_STATIC_JAVA_LIBRARIES := android-support-test ub-uiautomator
|
|
||||||
|
|
||||||
LOCAL_SRC_FILES := $(call all-subdir-java-files)
|
|
||||||
LOCAL_SRC_FILES += ../../src/com/android/server/pm/SuspendPackagesTest.java
|
|
||||||
|
|
||||||
LOCAL_PACKAGE_NAME := SuspendTestApp
|
|
||||||
LOCAL_DEX_PREOPT := false
|
|
||||||
LOCAL_PROGUARD_ENABLED := disabled
|
|
||||||
|
|
||||||
LOCAL_PRIVATE_PLATFORM_APIS := true
|
|
||||||
|
|
||||||
include $(BUILD_PACKAGE)
|
|
||||||
26
services/tests/shortcutmanagerutils/Android.bp
Normal file
26
services/tests/shortcutmanagerutils/Android.bp
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
// Copyright (C) 2016 The Android Open Source Project
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
java_library {
|
||||||
|
name: "ShortcutManagerTestUtils",
|
||||||
|
|
||||||
|
srcs: ["src/**/*.java"],
|
||||||
|
|
||||||
|
libs: [
|
||||||
|
"mockito-target",
|
||||||
|
"android.test.runner.stubs",
|
||||||
|
],
|
||||||
|
|
||||||
|
sdk_version: "test_current",
|
||||||
|
}
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
# Copyright (C) 2016 The Android Open Source Project
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
|
|
||||||
LOCAL_PATH:= $(call my-dir)
|
|
||||||
|
|
||||||
include $(CLEAR_VARS)
|
|
||||||
|
|
||||||
LOCAL_SRC_FILES := \
|
|
||||||
$(call all-java-files-under, src)
|
|
||||||
|
|
||||||
LOCAL_JAVA_LIBRARIES := \
|
|
||||||
mockito-target \
|
|
||||||
android.test.runner.stubs
|
|
||||||
|
|
||||||
LOCAL_MODULE_TAGS := optional
|
|
||||||
|
|
||||||
LOCAL_MODULE := ShortcutManagerTestUtils
|
|
||||||
|
|
||||||
LOCAL_SDK_VERSION := test_current
|
|
||||||
|
|
||||||
include $(BUILD_STATIC_JAVA_LIBRARY)
|
|
||||||
58
services/tests/uiservicestests/Android.bp
Normal file
58
services/tests/uiservicestests/Android.bp
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
//########################################################################
|
||||||
|
// Build FrameworksUiServicesTests package
|
||||||
|
//########################################################################
|
||||||
|
|
||||||
|
android_test {
|
||||||
|
name: "FrameworksUiServicesTests",
|
||||||
|
|
||||||
|
// Include test java files
|
||||||
|
srcs: [
|
||||||
|
"src/**/*.java",
|
||||||
|
],
|
||||||
|
|
||||||
|
static_libs: [
|
||||||
|
"services.accessibility",
|
||||||
|
"services.core",
|
||||||
|
"services.devicepolicy",
|
||||||
|
"services.net",
|
||||||
|
"services.usage",
|
||||||
|
"guava",
|
||||||
|
"android-support-test",
|
||||||
|
"mockito-target-inline-minus-junit4",
|
||||||
|
"platform-test-annotations",
|
||||||
|
"testables",
|
||||||
|
],
|
||||||
|
|
||||||
|
libs: [
|
||||||
|
"android.test.runner",
|
||||||
|
"android.test.base",
|
||||||
|
],
|
||||||
|
|
||||||
|
dxflags: ["--multi-dex"],
|
||||||
|
|
||||||
|
platform_apis: true,
|
||||||
|
test_suites: ["device-tests"],
|
||||||
|
|
||||||
|
certificate: "platform",
|
||||||
|
|
||||||
|
compile_multilib: "both",
|
||||||
|
|
||||||
|
// These are not normally accessible from apps so they must be explicitly included.
|
||||||
|
jni_libs: [
|
||||||
|
"libdexmakerjvmtiagent",
|
||||||
|
"libmultiplejvmtiagentsinterferenceagent",
|
||||||
|
"libbacktrace",
|
||||||
|
"libbase",
|
||||||
|
"libbinder",
|
||||||
|
"libbinderthreadstate",
|
||||||
|
"libc++",
|
||||||
|
"libcutils",
|
||||||
|
"liblog",
|
||||||
|
"liblzma",
|
||||||
|
"libnativehelper",
|
||||||
|
"libnetdaidl",
|
||||||
|
"libui",
|
||||||
|
"libunwind",
|
||||||
|
"libutils",
|
||||||
|
],
|
||||||
|
}
|
||||||
@@ -1,61 +0,0 @@
|
|||||||
#########################################################################
|
|
||||||
# Build FrameworksUiServicesTests package
|
|
||||||
#########################################################################
|
|
||||||
|
|
||||||
LOCAL_PATH:= $(call my-dir)
|
|
||||||
include $(CLEAR_VARS)
|
|
||||||
|
|
||||||
# We only want this apk build for tests.
|
|
||||||
LOCAL_MODULE_TAGS := tests
|
|
||||||
|
|
||||||
# Include test java files and source from notifications package.
|
|
||||||
LOCAL_SRC_FILES := $(call all-java-files-under, src) \
|
|
||||||
$(call all-java-files-under, ../../core/java/com/android/server/notification) \
|
|
||||||
$(call all-java-files-under, ../../core/java/com/android/server/slice) \
|
|
||||||
|
|
||||||
LOCAL_STATIC_JAVA_LIBRARIES := \
|
|
||||||
services.accessibility \
|
|
||||||
services.core \
|
|
||||||
services.devicepolicy \
|
|
||||||
services.net \
|
|
||||||
services.usage \
|
|
||||||
guava \
|
|
||||||
android-support-test \
|
|
||||||
mockito-target-inline-minus-junit4 \
|
|
||||||
platform-test-annotations \
|
|
||||||
testables
|
|
||||||
|
|
||||||
LOCAL_JAVA_LIBRARIES := android.test.runner android.test.base
|
|
||||||
|
|
||||||
LOCAL_JACK_FLAGS := --multi-dex native
|
|
||||||
LOCAL_DX_FLAGS := --multi-dex
|
|
||||||
|
|
||||||
LOCAL_PACKAGE_NAME := FrameworksUiServicesTests
|
|
||||||
LOCAL_PRIVATE_PLATFORM_APIS := true
|
|
||||||
LOCAL_COMPATIBILITY_SUITE := device-tests
|
|
||||||
|
|
||||||
LOCAL_CERTIFICATE := platform
|
|
||||||
|
|
||||||
LOCAL_MULTILIB := both
|
|
||||||
|
|
||||||
# These are not normally accessible from apps so they must be explicitly included.
|
|
||||||
LOCAL_JNI_SHARED_LIBRARIES := \
|
|
||||||
libdexmakerjvmtiagent \
|
|
||||||
libmultiplejvmtiagentsinterferenceagent \
|
|
||||||
libbacktrace \
|
|
||||||
libbase \
|
|
||||||
libbinder \
|
|
||||||
libbinderthreadstate \
|
|
||||||
libc++ \
|
|
||||||
libcutils \
|
|
||||||
liblog \
|
|
||||||
liblzma \
|
|
||||||
libnativehelper \
|
|
||||||
libnetdaidl \
|
|
||||||
libui \
|
|
||||||
libunwind \
|
|
||||||
libutils
|
|
||||||
|
|
||||||
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
|
|
||||||
|
|
||||||
include $(BUILD_PACKAGE)
|
|
||||||
42
services/tests/wmtests/Android.bp
Normal file
42
services/tests/wmtests/Android.bp
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
//########################################################################
|
||||||
|
// Build WmTests package
|
||||||
|
//########################################################################
|
||||||
|
|
||||||
|
android_test {
|
||||||
|
name: "WmTests",
|
||||||
|
|
||||||
|
// We only want this apk build for tests.
|
||||||
|
|
||||||
|
// Include all test java files.
|
||||||
|
srcs: [
|
||||||
|
"src/**/*.java",
|
||||||
|
],
|
||||||
|
|
||||||
|
static_libs: [
|
||||||
|
"androidx.test.runner",
|
||||||
|
"mockito-target-minus-junit4",
|
||||||
|
"platform-test-annotations",
|
||||||
|
"servicestests-utils",
|
||||||
|
],
|
||||||
|
|
||||||
|
libs: [
|
||||||
|
"android.test.mock",
|
||||||
|
"android.test.base",
|
||||||
|
"android.test.runner",
|
||||||
|
],
|
||||||
|
|
||||||
|
platform_apis: true,
|
||||||
|
test_suites: ["device-tests"],
|
||||||
|
|
||||||
|
certificate: "platform",
|
||||||
|
|
||||||
|
// ANDROIDMK TRANSLATION ERROR: unsupported assignment to LOCAL_JACK_FLAGS
|
||||||
|
// LOCAL_JACK_FLAGS := --multi-dex native
|
||||||
|
|
||||||
|
dxflags: ["--multi-dex"],
|
||||||
|
|
||||||
|
optimize: {
|
||||||
|
enabled: false,
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
#########################################################################
|
|
||||||
# Build WmTests package
|
|
||||||
#########################################################################
|
|
||||||
|
|
||||||
LOCAL_PATH:= $(call my-dir)
|
|
||||||
include $(CLEAR_VARS)
|
|
||||||
|
|
||||||
# We only want this apk build for tests.
|
|
||||||
LOCAL_MODULE_TAGS := tests
|
|
||||||
|
|
||||||
# Include all test java files.
|
|
||||||
LOCAL_SRC_FILES := \
|
|
||||||
$(call all-java-files-under, src) \
|
|
||||||
$(call all-java-files-under, ../servicestests/utils)
|
|
||||||
|
|
||||||
LOCAL_STATIC_JAVA_LIBRARIES := \
|
|
||||||
androidx.test.runner \
|
|
||||||
mockito-target-minus-junit4 \
|
|
||||||
platform-test-annotations \
|
|
||||||
|
|
||||||
LOCAL_JAVA_LIBRARIES := \
|
|
||||||
android.test.mock \
|
|
||||||
android.test.base \
|
|
||||||
android.test.runner \
|
|
||||||
|
|
||||||
LOCAL_PACKAGE_NAME := WmTests
|
|
||||||
LOCAL_PRIVATE_PLATFORM_APIS := true
|
|
||||||
LOCAL_COMPATIBILITY_SUITE := device-tests
|
|
||||||
|
|
||||||
LOCAL_CERTIFICATE := platform
|
|
||||||
|
|
||||||
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
|
|
||||||
|
|
||||||
LOCAL_JACK_FLAGS := --multi-dex native
|
|
||||||
LOCAL_DX_FLAGS := --multi-dex
|
|
||||||
|
|
||||||
LOCAL_PROGUARD_ENABLED := disabled
|
|
||||||
|
|
||||||
include $(BUILD_PACKAGE)
|
|
||||||
|
|
||||||
include $(call all-makefiles-under, $(LOCAL_PATH))
|
|
||||||
Reference in New Issue
Block a user