diff options
author | Sasha Smundak <asmundak@google.com> | 2019-02-11 16:58:07 -0800 |
---|---|---|
committer | Sasha Smundak <asmundak@google.com> | 2019-03-14 14:30:58 -0700 |
commit | 4a3d1a0b0cbfebd0a56e201aec32f367bf65bc5f (patch) | |
tree | 59a5458ad03addb7f2f8b5b35231f5d4f63899a9 /tests | |
parent | 96f51fd9706e3205eff41849e9bc0086cb8753d7 (diff) |
Convert tests/**/Android.mk files to Android.bp, part II
See build/soong/README.md for more information.
Bug: 122332340
Test: treehugger
Change-Id: I886b6536a0ef1c8d21f15ec7ff9fdb9784d5b865
Merged-In: I886b6536a0ef1c8d21f15ec7ff9fdb9784d5b865
Diffstat (limited to 'tests')
33 files changed, 379 insertions, 501 deletions
diff --git a/tests/ActivityManagerPerfTests/test-app/Android.bp b/tests/ActivityManagerPerfTests/test-app/Android.bp new file mode 100644 index 000000000000..ef9d587581c4 --- /dev/null +++ b/tests/ActivityManagerPerfTests/test-app/Android.bp @@ -0,0 +1,21 @@ +// 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: "ActivityManagerPerfTestsTestApp", + srcs: ["src/**/*.java"], + static_libs: ["ActivityManagerPerfTestsUtils"], + min_sdk_version: "25", + sdk_version: "current", +} diff --git a/tests/ActivityManagerPerfTests/test-app/Android.mk b/tests/ActivityManagerPerfTests/test-app/Android.mk deleted file mode 100644 index 33d15d2a3387..000000000000 --- a/tests/ActivityManagerPerfTests/test-app/Android.mk +++ /dev/null @@ -1,31 +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 := \ - ActivityManagerPerfTestsUtils - -LOCAL_MIN_SDK_VERSION := 25 - -LOCAL_PACKAGE_NAME := ActivityManagerPerfTestsTestApp -LOCAL_SDK_VERSION := current - -include $(BUILD_PACKAGE) diff --git a/tests/ActivityManagerPerfTests/tests/Android.bp b/tests/ActivityManagerPerfTests/tests/Android.bp new file mode 100644 index 000000000000..268715c6d1a6 --- /dev/null +++ b/tests/ActivityManagerPerfTests/tests/Android.bp @@ -0,0 +1,27 @@ +// 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: "ActivityManagerPerfTests", + srcs: ["src/**/*.java"], + static_libs: [ + "android-support-test", + "apct-perftests-utils", + "ActivityManagerPerfTestsUtils", + ], + platform_apis: true, + min_sdk_version: "25", + // For android.permission.FORCE_STOP_PACKAGES permission + certificate: "platform", +} diff --git a/tests/ActivityManagerPerfTests/tests/Android.mk b/tests/ActivityManagerPerfTests/tests/Android.mk deleted file mode 100644 index f23a665dc5b2..000000000000 --- a/tests/ActivityManagerPerfTests/tests/Android.mk +++ /dev/null @@ -1,36 +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 := \ - android-support-test \ - apct-perftests-utils \ - ActivityManagerPerfTestsUtils - -LOCAL_PACKAGE_NAME := ActivityManagerPerfTests -LOCAL_PRIVATE_PLATFORM_APIS := true - -LOCAL_MIN_SDK_VERSION := 25 - -# For android.permission.FORCE_STOP_PACKAGES permission -LOCAL_CERTIFICATE := platform - -include $(BUILD_PACKAGE) diff --git a/tests/ActivityManagerPerfTests/utils/Android.bp b/tests/ActivityManagerPerfTests/utils/Android.bp new file mode 100644 index 000000000000..c052656346cc --- /dev/null +++ b/tests/ActivityManagerPerfTests/utils/Android.bp @@ -0,0 +1,27 @@ +// 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. + +java_test { + name: "ActivityManagerPerfTestsUtils", + sdk_version: "current", + srcs: [ + "src/**/*.java", + "src/com/android/frameworks/perftests/am/util/ITimeReceiverCallback.aidl", + ], + static_libs: [ + "android-support-test", + "junit", + "ub-uiautomator", + ], +} diff --git a/tests/ActivityManagerPerfTests/utils/Android.mk b/tests/ActivityManagerPerfTests/utils/Android.mk deleted file mode 100644 index 60c94239d85f..000000000000 --- a/tests/ActivityManagerPerfTests/utils/Android.mk +++ /dev/null @@ -1,32 +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_SDK_VERSION := current - -LOCAL_SRC_FILES := \ - $(call all-java-files-under, src) \ - src/com/android/frameworks/perftests/am/util/ITimeReceiverCallback.aidl - -LOCAL_STATIC_JAVA_LIBRARIES := \ - android-support-test \ - junit \ - ub-uiautomator - -LOCAL_MODULE := ActivityManagerPerfTestsUtils - -include $(BUILD_STATIC_JAVA_LIBRARY) diff --git a/tests/AppLaunch/Android.bp b/tests/AppLaunch/Android.bp new file mode 100644 index 000000000000..0f07da61bc91 --- /dev/null +++ b/tests/AppLaunch/Android.bp @@ -0,0 +1,13 @@ +android_test { + name: "AppLaunch", + // Only compile source java files in this apk. + srcs: ["src/**/*.java"], + platform_apis: true, + certificate: "platform", + libs: [ + "android.test.base", + "android.test.runner", + ], + static_libs: ["android-support-test"], + test_suites: ["device-tests"], +} diff --git a/tests/AppLaunch/Android.mk b/tests/AppLaunch/Android.mk deleted file mode 100644 index 1fb548b0edde..000000000000 --- a/tests/AppLaunch/Android.mk +++ /dev/null @@ -1,22 +0,0 @@ -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_MODULE_TAGS := tests - -# Only compile source java files in this apk. -LOCAL_SRC_FILES := $(call all-java-files-under, src) - -LOCAL_PACKAGE_NAME := AppLaunch -LOCAL_PRIVATE_PLATFORM_APIS := true - -LOCAL_CERTIFICATE := platform -LOCAL_JAVA_LIBRARIES := android.test.base android.test.runner - -LOCAL_STATIC_JAVA_LIBRARIES := android-support-test - -LOCAL_COMPATIBILITY_SUITE := device-tests - -include $(BUILD_PACKAGE) - -# Use the following include to make our test apk. -include $(call all-makefiles-under,$(LOCAL_PATH)) diff --git a/tests/AppLaunchWear/Android.bp b/tests/AppLaunchWear/Android.bp new file mode 100644 index 000000000000..6a8b38200700 --- /dev/null +++ b/tests/AppLaunchWear/Android.bp @@ -0,0 +1,13 @@ +android_test { + name: "AppLaunchWear", + // Only compile source java files in this apk. + srcs: ["src/**/*.java"], + platform_apis: true, + certificate: "platform", + libs: [ + "android.test.base", + "android.test.runner", + ], + static_libs: ["android-support-test"], + test_suites: ["device-tests"], +} diff --git a/tests/AppLaunchWear/Android.mk b/tests/AppLaunchWear/Android.mk deleted file mode 100644 index 6d083661324d..000000000000 --- a/tests/AppLaunchWear/Android.mk +++ /dev/null @@ -1,22 +0,0 @@ -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_MODULE_TAGS := tests - -# Only compile source java files in this apk. -LOCAL_SRC_FILES := $(call all-java-files-under, src) - -LOCAL_PACKAGE_NAME := AppLaunchWear -LOCAL_PRIVATE_PLATFORM_APIS := true - -LOCAL_CERTIFICATE := platform -LOCAL_JAVA_LIBRARIES := android.test.base android.test.runner - -LOCAL_STATIC_JAVA_LIBRARIES := android-support-test - -LOCAL_COMPATIBILITY_SUITE := device-tests - -include $(BUILD_PACKAGE) - -# Use the following include to make our test apk. -include $(call all-makefiles-under,$(LOCAL_PATH)) diff --git a/tests/BackgroundDexOptServiceIntegrationTests/Android.bp b/tests/BackgroundDexOptServiceIntegrationTests/Android.bp new file mode 100644 index 000000000000..036f84526889 --- /dev/null +++ b/tests/BackgroundDexOptServiceIntegrationTests/Android.bp @@ -0,0 +1,24 @@ +// +// 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 { + name: "BackgroundDexOptServiceIntegrationTests", + srcs: ["src/**/*.java"], + static_libs: ["android-support-test"], + platform_apis: true, + test_suites: ["device-tests"], + certificate: "platform", +} diff --git a/tests/BackgroundDexOptServiceIntegrationTests/Android.mk b/tests/BackgroundDexOptServiceIntegrationTests/Android.mk deleted file mode 100644 index b10305d96fce..000000000000 --- a/tests/BackgroundDexOptServiceIntegrationTests/Android.mk +++ /dev/null @@ -1,35 +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) - -# 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) - -LOCAL_STATIC_JAVA_LIBRARIES := \ - android-support-test \ - -LOCAL_PACKAGE_NAME := BackgroundDexOptServiceIntegrationTests -LOCAL_PRIVATE_PLATFORM_APIS := true -LOCAL_COMPATIBILITY_SUITE := device-tests - -LOCAL_CERTIFICATE := platform - -include $(BUILD_PACKAGE) diff --git a/tests/Compatibility/Android.bp b/tests/Compatibility/Android.bp new file mode 100644 index 000000000000..a0c37619841f --- /dev/null +++ b/tests/Compatibility/Android.bp @@ -0,0 +1,22 @@ +// Copyright (C) 2012 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: "AppCompatibilityTest", + static_libs: ["android-support-test"], + // Include all test java files. + srcs: ["src/**/*.java"], + platform_apis: true, + certificate: "platform", +} diff --git a/tests/Compatibility/Android.mk b/tests/Compatibility/Android.mk deleted file mode 100644 index 9c47a2610223..000000000000 --- a/tests/Compatibility/Android.mk +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright (C) 2012 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) - -# We only want this apk build for tests. -LOCAL_MODULE_TAGS := tests -LOCAL_STATIC_JAVA_LIBRARIES := android-support-test -# Include all test java files. -LOCAL_SRC_FILES := \ - $(call all-java-files-under, src) - - -LOCAL_PACKAGE_NAME := AppCompatibilityTest -LOCAL_PRIVATE_PLATFORM_APIS := true -LOCAL_CERTIFICATE := platform -include $(BUILD_PACKAGE) - -include $(call all-makefiles-under,$(LOCAL_PATH)) diff --git a/tests/Internal/Android.bp b/tests/Internal/Android.bp new file mode 100644 index 000000000000..db3e03bf20ed --- /dev/null +++ b/tests/Internal/Android.bp @@ -0,0 +1,18 @@ +android_test { + name: "InternalTests", + proto: { + type: "nano", + }, + // Include some source files directly to be able to access package members + srcs: ["src/**/*.java"], + libs: ["android.test.runner"], + static_libs: [ + "junit", + "android-support-test", + "mockito-target-minus-junit4", + ], + java_resource_dirs: ["res"], + certificate: "platform", + platform_apis: true, + test_suites: ["device-tests"], +} diff --git a/tests/Internal/Android.mk b/tests/Internal/Android.mk deleted file mode 100644 index da566967fbeb..000000000000 --- a/tests/Internal/Android.mk +++ /dev/null @@ -1,24 +0,0 @@ -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_USE_AAPT2 := true -LOCAL_MODULE_TAGS := tests - -LOCAL_PROTOC_OPTIMIZE_TYPE := nano - -# Include some source files directly to be able to access package members -LOCAL_SRC_FILES := $(call all-java-files-under, src) - -LOCAL_JAVA_LIBRARIES := android.test.runner -LOCAL_STATIC_JAVA_LIBRARIES := junit \ - android-support-test \ - mockito-target-minus-junit4 - -LOCAL_JAVA_RESOURCE_DIRS := res -LOCAL_CERTIFICATE := platform - -LOCAL_PACKAGE_NAME := InternalTests -LOCAL_PRIVATE_PLATFORM_APIS := true -LOCAL_COMPATIBILITY_SUITE := device-tests - -include $(BUILD_PACKAGE) diff --git a/tests/JankBench/app/src/main/jni/Android.bp.converted b/tests/JankBench/app/src/main/jni/Android.bp.converted index 9fecf1599fd9..b53c79ad8b7c 100644 --- a/tests/JankBench/app/src/main/jni/Android.bp.converted +++ b/tests/JankBench/app/src/main/jni/Android.bp.converted @@ -12,12 +12,20 @@ // See the License for the specific language governing permissions and // limitations under the License. +<<<<<<< HEAD cc_library_shared { name: "libnativebench", cflags: [ "-Wno-unused-parameter", "-Wno-unused-variable", ], +======= +// ANDROIDMK TRANSLATION WARNING: No 'include $(CLEAR_VARS)' detected before first assignment; clearing vars now + +cc_library_shared { + name: "libnativebench", + cflags: ["-Wno-unused-parameter"], +>>>>>>> Convert Android.mk file to Android.bp srcs: [ "Bench.cpp", "WorkerPool.cpp", diff --git a/tests/RcsTests/Android.bp b/tests/RcsTests/Android.bp new file mode 100644 index 000000000000..81c6df070881 --- /dev/null +++ b/tests/RcsTests/Android.bp @@ -0,0 +1,17 @@ +android_test { + name: "RcsTests", + // Only compile source java files in this apk. + srcs: ["src/**/*.java"], + platform_apis: true, + certificate: "platform", + libs: [ + "android.test.runner", + "android.test.base", + ], + static_libs: [ + "junit", + "android-support-test", + "mockito-target-minus-junit4", + "truth-prebuilt", + ], +} diff --git a/tests/RcsTests/Android.mk b/tests/RcsTests/Android.mk deleted file mode 100644 index 7b348d73747a..000000000000 --- a/tests/RcsTests/Android.mk +++ /dev/null @@ -1,19 +0,0 @@ -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_MODULE_TAGS := tests - -# Only compile source java files in this apk. -LOCAL_SRC_FILES := $(call all-java-files-under, src) - -LOCAL_PACKAGE_NAME := RcsTests -LOCAL_PRIVATE_PLATFORM_APIS := true - -LOCAL_CERTIFICATE := platform -LOCAL_JAVA_LIBRARIES := android.test.runner android.test.base -LOCAL_STATIC_JAVA_LIBRARIES := junit android-support-test mockito-target-minus-junit4 truth-prebuilt - -include $(BUILD_PACKAGE) - -# Use the following include to make our test apk. -include $(call all-makefiles-under,$(LOCAL_PATH)) diff --git a/tests/ServiceCrashTest/Android.bp b/tests/ServiceCrashTest/Android.bp new file mode 100644 index 000000000000..b646ae7d33d3 --- /dev/null +++ b/tests/ServiceCrashTest/Android.bp @@ -0,0 +1,12 @@ +android_test { + name: "ServiceCrashTest", + // Only compile source java files in this apk. + srcs: ["src/**/*.java"], + platform_apis: true, + certificate: "platform", + libs: ["android.test.base"], + static_libs: [ + "compatibility-device-util", + "android-support-test", + ], +} diff --git a/tests/ServiceCrashTest/Android.mk b/tests/ServiceCrashTest/Android.mk deleted file mode 100644 index d1f6450e84a6..000000000000 --- a/tests/ServiceCrashTest/Android.mk +++ /dev/null @@ -1,20 +0,0 @@ -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_MODULE_TAGS := tests - -# Only compile source java files in this apk. -LOCAL_SRC_FILES := $(call all-java-files-under, src) - -LOCAL_PACKAGE_NAME := ServiceCrashTest -LOCAL_PRIVATE_PLATFORM_APIS := true - -LOCAL_CERTIFICATE := platform -LOCAL_JAVA_LIBRARIES := android.test.base - -LOCAL_STATIC_JAVA_LIBRARIES := compatibility-device-util android-support-test - -include $(BUILD_PACKAGE) - -# Use the following include to make our test apk. -include $(call all-makefiles-under,$(LOCAL_PATH)) diff --git a/tests/SurfaceComposition/Android.bp b/tests/SurfaceComposition/Android.bp new file mode 100644 index 000000000000..53e4d52b2efd --- /dev/null +++ b/tests/SurfaceComposition/Android.bp @@ -0,0 +1,32 @@ +// Copyright (C) 2015 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: "SurfaceComposition", + // Don't include this package in any target + // When built, explicitly put it in the data partition. + dex_preopt: { + enabled: false, + }, + optimize: { + enabled: false, + }, + srcs: ["src/**/*.java"], + static_libs: ["junit"], + libs: [ + "android.test.runner.stubs", + "android.test.base.stubs", + ], + sdk_version: "current", +} diff --git a/tests/SurfaceComposition/Android.mk b/tests/SurfaceComposition/Android.mk deleted file mode 100644 index f59458d48c68..000000000000 --- a/tests/SurfaceComposition/Android.mk +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (C) 2015 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) - -# Don't include this package in any target -LOCAL_MODULE_TAGS := tests -# When built, explicitly put it in the data partition. -LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS) - -LOCAL_DEX_PREOPT := false - -LOCAL_PROGUARD_ENABLED := disabled - -LOCAL_SRC_FILES := $(call all-java-files-under, src) - -LOCAL_STATIC_JAVA_LIBRARIES := junit - -LOCAL_JAVA_LIBRARIES := android.test.runner.stubs android.test.base.stubs - -LOCAL_PACKAGE_NAME := SurfaceComposition - -LOCAL_SDK_VERSION := current - -include $(BUILD_PACKAGE) diff --git a/tests/UsbHostExternalManagmentTest/AoapTestDevice/Android.bp b/tests/UsbHostExternalManagmentTest/AoapTestDevice/Android.bp new file mode 100644 index 000000000000..c7e9df0fe9cf --- /dev/null +++ b/tests/UsbHostExternalManagmentTest/AoapTestDevice/Android.bp @@ -0,0 +1,27 @@ +// 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. +// +// + +//################################################# + +android_test { + name: "AoapTestDeviceApp", + srcs: ["src/**/*.java"], + resource_dirs: ["res"], + platform_apis: true, + optimize: { + enabled: false, + }, +} diff --git a/tests/UsbHostExternalManagmentTest/AoapTestDevice/Android.mk b/tests/UsbHostExternalManagmentTest/AoapTestDevice/Android.mk deleted file mode 100644 index cd7aaedf2bb1..000000000000 --- a/tests/UsbHostExternalManagmentTest/AoapTestDevice/Android.mk +++ /dev/null @@ -1,36 +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_RESOURCE_DIR := $(LOCAL_PATH)/res - -LOCAL_PACKAGE_NAME := AoapTestDeviceApp -LOCAL_PRIVATE_PLATFORM_APIS := true - -LOCAL_MODULE_TAGS := tests -LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS) - -LOCAL_PROGUARD_ENABLED := disabled - -include $(BUILD_PACKAGE) - diff --git a/tests/UsbHostExternalManagmentTest/AoapTestHost/Android.bp b/tests/UsbHostExternalManagmentTest/AoapTestHost/Android.bp new file mode 100644 index 000000000000..6fa58cb5c682 --- /dev/null +++ b/tests/UsbHostExternalManagmentTest/AoapTestHost/Android.bp @@ -0,0 +1,27 @@ +// 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. +// +// + +//################################################# + +android_test { + name: "AoapTestHostApp", + srcs: ["src/**/*.java"], + resource_dirs: ["res"], + platform_apis: true, + optimize: { + enabled: false, + }, +} diff --git a/tests/UsbHostExternalManagmentTest/AoapTestHost/Android.mk b/tests/UsbHostExternalManagmentTest/AoapTestHost/Android.mk deleted file mode 100644 index bd8a51b69bff..000000000000 --- a/tests/UsbHostExternalManagmentTest/AoapTestHost/Android.mk +++ /dev/null @@ -1,36 +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_RESOURCE_DIR := $(LOCAL_PATH)/res - -LOCAL_PACKAGE_NAME := AoapTestHostApp -LOCAL_PRIVATE_PLATFORM_APIS := true - -LOCAL_MODULE_TAGS := tests -LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS) - -LOCAL_PROGUARD_ENABLED := disabled - -include $(BUILD_PACKAGE) - diff --git a/tests/UsbHostExternalManagmentTest/UsbHostExternalManagmentTestApp/Android.bp b/tests/UsbHostExternalManagmentTest/UsbHostExternalManagmentTestApp/Android.bp new file mode 100644 index 000000000000..edd4205968b3 --- /dev/null +++ b/tests/UsbHostExternalManagmentTest/UsbHostExternalManagmentTestApp/Android.bp @@ -0,0 +1,32 @@ +// 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. +// +// + +//################################################# + +// TODO: should this be android_helper_test_app? +android_app { + name: "UsbHostExternalManagementTestApp", + srcs: ["src/**/*.java"], + resource_dirs: ["res"], + platform_apis: true, + privileged: true, + // TODO remove tests tag + //LOCAL_MODULE_TAGS := tests + //LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS) + optimize: { + enabled: false, + }, +} diff --git a/tests/UsbHostExternalManagmentTest/UsbHostExternalManagmentTestApp/Android.mk b/tests/UsbHostExternalManagmentTest/UsbHostExternalManagmentTestApp/Android.mk deleted file mode 100644 index fed454eb9d01..000000000000 --- a/tests/UsbHostExternalManagmentTest/UsbHostExternalManagmentTestApp/Android.mk +++ /dev/null @@ -1,38 +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_RESOURCE_DIR := $(LOCAL_PATH)/res - -LOCAL_PACKAGE_NAME := UsbHostExternalManagementTestApp -LOCAL_PRIVATE_PLATFORM_APIS := true - -LOCAL_PRIVILEGED_MODULE := true -# TODO remove tests tag -#LOCAL_MODULE_TAGS := tests -#LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS) - -LOCAL_PROGUARD_ENABLED := disabled - -include $(BUILD_PACKAGE) - diff --git a/tests/UsbTests/Android.bp b/tests/UsbTests/Android.bp new file mode 100644 index 000000000000..7dc7c85b25de --- /dev/null +++ b/tests/UsbTests/Android.bp @@ -0,0 +1,34 @@ +// +// 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: "UsbTests", + srcs: ["**/*.java"], + static_libs: [ + "frameworks-base-testutils", + "android-support-test", + "mockito-target-inline-minus-junit4", + "platform-test-annotations", + "services.core", + "services.net", + "services.usb", + "truth-prebuilt", + ], + jni_libs: ["libdexmakerjvmtiagent"], + certificate: "platform", + platform_apis: true, + test_suites: ["device-tests"], +} diff --git a/tests/UsbTests/Android.mk b/tests/UsbTests/Android.mk deleted file mode 100644 index 4e215cc5996f..000000000000 --- a/tests/UsbTests/Android.mk +++ /dev/null @@ -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-subdir-java-files) - -LOCAL_STATIC_JAVA_LIBRARIES := \ - frameworks-base-testutils \ - android-support-test \ - mockito-target-inline-minus-junit4 \ - platform-test-annotations \ - services.core \ - services.net \ - services.usb \ - truth-prebuilt \ - -LOCAL_JNI_SHARED_LIBRARIES := \ - libdexmakerjvmtiagent \ - -LOCAL_CERTIFICATE := platform - -LOCAL_PACKAGE_NAME := UsbTests -LOCAL_PRIVATE_PLATFORM_APIS := true - -LOCAL_COMPATIBILITY_SUITE := device-tests - -include $(BUILD_PACKAGE) diff --git a/tests/WindowAnimationJank/Android.bp b/tests/WindowAnimationJank/Android.bp new file mode 100644 index 000000000000..60e8f7417194 --- /dev/null +++ b/tests/WindowAnimationJank/Android.bp @@ -0,0 +1,25 @@ +// Copyright (C) 2015 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: "WindowAnimationJank", + srcs: ["src/**/*.java"], + static_libs: [ + "ub-uiautomator", + "ub-janktesthelper", + "junit", + ], + libs: ["android.test.base.stubs"], + sdk_version: "current", +} diff --git a/tests/WindowAnimationJank/Android.mk b/tests/WindowAnimationJank/Android.mk deleted file mode 100644 index 7800a8078d2a..000000000000 --- a/tests/WindowAnimationJank/Android.mk +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright (C) 2015 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_MODULE_PATH := $(TARGET_OUT_DATA_APPS) - -LOCAL_SRC_FILES := $(call all-java-files-under, src) - -LOCAL_PACKAGE_NAME := WindowAnimationJank - -LOCAL_STATIC_JAVA_LIBRARIES := \ - ub-uiautomator \ - ub-janktesthelper \ - junit - -LOCAL_JAVA_LIBRARIES := android.test.base.stubs - -LOCAL_SDK_VERSION := current - -include $(BUILD_PACKAGE) |