diff options
author | Sasha Smundak <asmundak@google.com> | 2019-03-10 19:48:23 -0700 |
---|---|---|
committer | Sasha Smundak <asmundak@google.com> | 2019-03-12 09:37:32 -0700 |
commit | 89414e1ed5a0d22869ac71b9c9b99421f67ab83d (patch) | |
tree | ac7ef18cb08e6c1b45aba23cf271b10c4d034399 | |
parent | e756f460d028794a265494e0619db02e6905676a (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
55 files changed, 612 insertions, 827 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..2ae2cc49bb7a --- /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: [ + "androidx.test.rules", + "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 e1f56b8ba55f..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 := \ - androidx.test.rules \ - 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..300b7ea998fa --- /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: [ + "androidx.test.rules", + "junit", + "ub-uiautomator", + ], +} diff --git a/tests/ActivityManagerPerfTests/utils/Android.mk b/tests/ActivityManagerPerfTests/utils/Android.mk deleted file mode 100644 index 7a7471dd6cd8..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 := \ - androidx.test.rules \ - junit \ - ub-uiautomator - -LOCAL_MODULE := ActivityManagerPerfTestsUtils - -include $(BUILD_STATIC_JAVA_LIBRARY) diff --git a/tests/ActivityViewTest/Android.bp b/tests/ActivityViewTest/Android.bp new file mode 100644 index 000000000000..e7b8c8e1d058 --- /dev/null +++ b/tests/ActivityViewTest/Android.bp @@ -0,0 +1,6 @@ +android_test { + name: "ActivityViewTest", + srcs: ["src/**/*.java"], + platform_apis: true, + certificate: "platform", +} diff --git a/tests/ActivityViewTest/Android.mk b/tests/ActivityViewTest/Android.mk deleted file mode 100644 index 9c7ca7eb5d00..000000000000 --- a/tests/ActivityViewTest/Android.mk +++ /dev/null @@ -1,12 +0,0 @@ -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_SRC_FILES := $(call all-java-files-under, src) - -LOCAL_PACKAGE_NAME := ActivityViewTest -LOCAL_PRIVATE_PLATFORM_APIS := true - -LOCAL_MODULE_TAGS := tests -LOCAL_CERTIFICATE := platform - -include $(BUILD_PACKAGE) diff --git a/tests/AppLaunch/Android.bp b/tests/AppLaunch/Android.bp new file mode 100644 index 000000000000..f90f26f00e6d --- /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: ["androidx.test.rules"], + test_suites: ["device-tests"], +} diff --git a/tests/AppLaunch/Android.mk b/tests/AppLaunch/Android.mk deleted file mode 100644 index f50bca560f83..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 := androidx.test.rules - -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..8d34b6eb9c0f --- /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: ["androidx.test.rules"], + test_suites: ["device-tests"], +} diff --git a/tests/AppLaunchWear/Android.mk b/tests/AppLaunchWear/Android.mk deleted file mode 100644 index 332b6808ace8..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 := androidx.test.rules - -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..a85d129b013a --- /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: ["androidx.test.rules"], + 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 f47cf96446ba..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 := \ - androidx.test.rules \ - -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..4ca406eba3cf --- /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: ["androidx.test.rules"], + // 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 643f9ebd5f15..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 := androidx.test.rules -# 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/FlickerTests/Android.bp b/tests/FlickerTests/Android.bp new file mode 100644 index 000000000000..05f0a8e7921d --- /dev/null +++ b/tests/FlickerTests/Android.bp @@ -0,0 +1,30 @@ +// +// 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: "FlickerTests", + srcs: ["src/**/*.java"], + platform_apis: true, + certificate: "platform", + test_suites: ["device-tests"], + libs: ["android.test.runner"], + static_libs: [ + "flickertestapplib", + "flickerlib", + "truth-prebuilt", + "app-helpers-core", + ], +} diff --git a/tests/FlickerTests/Android.mk b/tests/FlickerTests/Android.mk deleted file mode 100644 index 3c70f8bc2d72..000000000000 --- a/tests/FlickerTests/Android.mk +++ /dev/null @@ -1,35 +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_PACKAGE_NAME := FlickerTests -LOCAL_MODULE_TAGS := tests optional -LOCAL_SRC_FILES := $(call all-java-files-under, src) -LOCAL_PRIVATE_PLATFORM_APIS := true -LOCAL_CERTIFICATE := platform -LOCAL_COMPATIBILITY_SUITE := device-tests - -LOCAL_JAVA_LIBRARIES := android.test.runner -LOCAL_STATIC_JAVA_LIBRARIES := \ - flickertestapplib \ - flickerlib \ - truth-prebuilt \ - app-helpers-core - -include $(BUILD_PACKAGE) -include $(call all-makefiles-under,$(LOCAL_PATH))
\ No newline at end of file diff --git a/tests/FlickerTests/lib/Android.bp b/tests/FlickerTests/lib/Android.bp new file mode 100644 index 000000000000..982fcbadddf7 --- /dev/null +++ b/tests/FlickerTests/lib/Android.bp @@ -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. +// + +java_test { + name: "flickerlib", + platform_apis: true, + srcs: ["src/**/*.java"], + static_libs: [ + "androidx.test.janktesthelper", + "cts-amwm-util", + "platformprotosnano", + "layersprotosnano", + "truth-prebuilt", + "sysui-helper", + "launcher-helper-lib", + ], +} + +java_library { + name: "flickerautomationhelperlib", + sdk_version: "test_current", + srcs: [ + "src/com/android/server/wm/flicker/AutomationUtils.java", + "src/com/android/server/wm/flicker/WindowUtils.java", + ], + static_libs: [ + "sysui-helper", + "launcher-helper-lib", + "compatibility-device-util-axt", + ], +} diff --git a/tests/FlickerTests/lib/Android.mk b/tests/FlickerTests/lib/Android.mk deleted file mode 100644 index e438822a6f32..000000000000 --- a/tests/FlickerTests/lib/Android.mk +++ /dev/null @@ -1,48 +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 := flickerlib -LOCAL_MODULE_TAGS := tests optional -# sign this with platform cert, so this test is allowed to call private platform apis -LOCAL_CERTIFICATE := platform -LOCAL_PRIVATE_PLATFORM_APIS := true -LOCAL_SRC_FILES := $(call all-java-files-under, src) -LOCAL_STATIC_JAVA_LIBRARIES := \ - androidx.test.janktesthelper \ - cts-amwm-util \ - platformprotosnano \ - layersprotosnano \ - truth-prebuilt \ - sysui-helper \ - launcher-helper-lib \ - -include $(BUILD_STATIC_JAVA_LIBRARY) - -include $(CLEAR_VARS) -LOCAL_MODULE := flickerautomationhelperlib -LOCAL_SDK_VERSION := current -LOCAL_SRC_FILES := src/com/android/server/wm/flicker/AutomationUtils.java \ - src/com/android/server/wm/flicker/WindowUtils.java -LOCAL_STATIC_JAVA_LIBRARIES := sysui-helper \ - launcher-helper-lib \ - compatibility-device-util-axt - -include $(BUILD_STATIC_JAVA_LIBRARY) - -include $(call all-makefiles-under,$(LOCAL_PATH)) diff --git a/tests/FlickerTests/lib/test/Android.bp b/tests/FlickerTests/lib/test/Android.bp new file mode 100644 index 000000000000..bfeb75b23469 --- /dev/null +++ b/tests/FlickerTests/lib/test/Android.bp @@ -0,0 +1,33 @@ +// +// 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: "FlickerLibTest", + // sign this with platform cert, so this test is allowed to call private platform apis + certificate: "platform", + platform_apis: true, + test_suites: ["tests"], + srcs: ["src/**/*.java"], + libs: ["android.test.runner"], + static_libs: [ + "androidx.test.rules", + "platform-test-annotations", + "truth-prebuilt", + "platformprotosnano", + "layersprotosnano", + "flickerlib", + ], +} diff --git a/tests/FlickerTests/lib/test/Android.mk b/tests/FlickerTests/lib/test/Android.mk deleted file mode 100644 index 5be89ba624e6..000000000000 --- a/tests/FlickerTests/lib/test/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_PACKAGE_NAME := FlickerLibTest -LOCAL_MODULE_TAGS := tests optional -# sign this with platform cert, so this test is allowed to call private platform apis -LOCAL_CERTIFICATE := platform -LOCAL_PRIVATE_PLATFORM_APIS := true -LOCAL_COMPATIBILITY_SUITE := tests -LOCAL_SRC_FILES := $(call all-java-files-under, src) -LOCAL_JAVA_LIBRARIES := android.test.runner -LOCAL_STATIC_JAVA_LIBRARIES := \ - androidx.test.rules \ - platform-test-annotations \ - truth-prebuilt \ - platformprotosnano \ - layersprotosnano \ - flickerlib - -include $(BUILD_PACKAGE) -include $(call all-makefiles-under,$(LOCAL_PATH))
\ No newline at end of file diff --git a/tests/FlickerTests/test-apps/Android.bp b/tests/FlickerTests/test-apps/Android.bp new file mode 100644 index 000000000000..e69de29bb2d1 --- /dev/null +++ b/tests/FlickerTests/test-apps/Android.bp diff --git a/tests/FlickerTests/test-apps/Android.mk b/tests/FlickerTests/test-apps/Android.mk deleted file mode 100644 index 9af9f444ca59..000000000000 --- a/tests/FlickerTests/test-apps/Android.mk +++ /dev/null @@ -1,15 +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. - -include $(call all-subdir-makefiles) diff --git a/tests/FlickerTests/test-apps/flickerapp/Android.bp b/tests/FlickerTests/test-apps/flickerapp/Android.bp new file mode 100644 index 000000000000..0bea209a757a --- /dev/null +++ b/tests/FlickerTests/test-apps/flickerapp/Android.bp @@ -0,0 +1,26 @@ +// 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: "FlickerTestApp", + srcs: ["**/*.java"], + sdk_version: "current", + test_suites: ["device-tests"], +} + +java_test { + name: "flickertestapplib", + sdk_version: "current", + srcs: ["src/com/android/server/wm/flicker/testapp/ActivityOptions.java"], +} diff --git a/tests/FlickerTests/test-apps/flickerapp/Android.mk b/tests/FlickerTests/test-apps/flickerapp/Android.mk deleted file mode 100644 index b916900a7504..000000000000 --- a/tests/FlickerTests/test-apps/flickerapp/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_PACKAGE_NAME := FlickerTestApp -LOCAL_MODULE_TAGS := tests optional -LOCAL_SRC_FILES := $(call all-subdir-java-files) -LOCAL_SDK_VERSION := current -LOCAL_COMPATIBILITY_SUITE := device-tests -include $(BUILD_PACKAGE) - -include $(CLEAR_VARS) -LOCAL_MODULE := flickertestapplib -LOCAL_MODULE_TAGS := tests optional -LOCAL_SDK_VERSION := current -LOCAL_SRC_FILES := src/com/android/server/wm/flicker/testapp/ActivityOptions.java -include $(BUILD_STATIC_JAVA_LIBRARY) - -include $(call all-makefiles-under,$(LOCAL_PATH))
\ No newline at end of file diff --git a/tests/Internal/Android.bp b/tests/Internal/Android.bp new file mode 100644 index 000000000000..4cb9f8d5e1e6 --- /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", + "androidx.test.rules", + "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 2e26ef103794..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 \ - androidx.test.rules \ - 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/PackageWatchdog/Android.bp b/tests/PackageWatchdog/Android.bp new file mode 100644 index 000000000000..b07996568839 --- /dev/null +++ b/tests/PackageWatchdog/Android.bp @@ -0,0 +1,28 @@ +// Copyright (C) 2019 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. + +// PackageWatchdogTest +android_test { + name: "PackageWatchdogTest", + srcs: ["src/**/*.java"], + static_libs: [ + "junit", + "frameworks-base-testutils", + "androidx.test.rules", + "services.core", + ], + libs: ["android.test.runner"], + platform_apis: true, + test_suites: ["device-tests"], +} diff --git a/tests/PackageWatchdog/Android.mk b/tests/PackageWatchdog/Android.mk deleted file mode 100644 index 1e4aacce1613..000000000000 --- a/tests/PackageWatchdog/Android.mk +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright (C) 2019 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) - -# PackageWatchdogTest -include $(CLEAR_VARS) -LOCAL_SRC_FILES := $(call all-java-files-under, src) -LOCAL_PACKAGE_NAME := PackageWatchdogTest -LOCAL_MODULE_TAGS := tests -LOCAL_STATIC_JAVA_LIBRARIES := \ - junit \ - frameworks-base-testutils \ - androidx.test.rules \ - services.core - -LOCAL_JAVA_LIBRARIES := \ - android.test.runner - -LOCAL_PRIVATE_PLATFORM_APIS := true -LOCAL_COMPATIBILITY_SUITE := device-tests - -include $(BUILD_PACKAGE) diff --git a/tests/RcsTests/Android.bp b/tests/RcsTests/Android.bp new file mode 100644 index 000000000000..8ee496066bb3 --- /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", + "androidx.test.rules", + "mockito-target-minus-junit4", + "truth-prebuilt", + ], +} diff --git a/tests/RcsTests/Android.mk b/tests/RcsTests/Android.mk deleted file mode 100644 index a276584530f4..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 androidx.test.rules 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..40a377de852f --- /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-axt", + "androidx.test.rules", + ], +} diff --git a/tests/ServiceCrashTest/Android.mk b/tests/ServiceCrashTest/Android.mk deleted file mode 100644 index 617ee7caf139..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-axt androidx.test.rules - -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/SystemMemoryTest/Android.mk b/tests/SystemMemoryTest/Android.mk deleted file mode 100644 index 09a1618c6ad1..000000000000 --- a/tests/SystemMemoryTest/Android.mk +++ /dev/null @@ -1,17 +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 $(call all-subdir-makefiles) diff --git a/tests/SystemMemoryTest/device/Android.bp b/tests/SystemMemoryTest/device/Android.bp new file mode 100644 index 000000000000..2bf0fec0fd1f --- /dev/null +++ b/tests/SystemMemoryTest/device/Android.bp @@ -0,0 +1,20 @@ +// 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: "SystemMemoryTestDevice", + sdk_version: "current", + srcs: ["src/**/*.java"], + test_suites: ["general-tests"], +} diff --git a/tests/SystemMemoryTest/device/Android.mk b/tests/SystemMemoryTest/device/Android.mk deleted file mode 100644 index 75408df4b295..000000000000 --- a/tests/SystemMemoryTest/device/Android.mk +++ /dev/null @@ -1,24 +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 := optional -LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS) -LOCAL_PACKAGE_NAME := SystemMemoryTestDevice -LOCAL_SDK_VERSION := current -LOCAL_SRC_FILES := $(call all-java-files-under, src) -LOCAL_COMPATIBILITY_SUITE := general-tests -include $(BUILD_PACKAGE) diff --git a/tests/SystemMemoryTest/host/Android.bp b/tests/SystemMemoryTest/host/Android.bp new file mode 100644 index 000000000000..3bb5489dab6c --- /dev/null +++ b/tests/SystemMemoryTest/host/Android.bp @@ -0,0 +1,20 @@ +// 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_host { + name: "system-memory-test", + srcs: ["src/**/*.java"], + libs: ["tradefed"], + test_suites: ["general-tests"], +} diff --git a/tests/SystemMemoryTest/host/Android.mk b/tests/SystemMemoryTest/host/Android.mk deleted file mode 100644 index a516e38adfec..000000000000 --- a/tests/SystemMemoryTest/host/Android.mk +++ /dev/null @@ -1,23 +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_SRC_FILES := $(call all-java-files-under, src) -LOCAL_MODULE := system-memory-test -LOCAL_MODULE_TAGS := optional -LOCAL_JAVA_LIBRARIES := tradefed -LOCAL_COMPATIBILITY_SUITE := general-tests -include $(BUILD_HOST_JAVA_LIBRARY) diff --git a/tests/UsageReportingTest/Android.bp b/tests/UsageReportingTest/Android.bp new file mode 100644 index 000000000000..0bac5a224b26 --- /dev/null +++ b/tests/UsageReportingTest/Android.bp @@ -0,0 +1,8 @@ +android_test { + name: "UsageReportingTest", + // Only compile source java files in this apk. + srcs: ["src/**/*.java"], + static_libs: ["androidx.legacy_legacy-support-v4"], + certificate: "platform", + platform_apis: true, +} diff --git a/tests/UsageReportingTest/Android.mk b/tests/UsageReportingTest/Android.mk deleted file mode 100644 index afb6e16b1fdf..000000000000 --- a/tests/UsageReportingTest/Android.mk +++ /dev/null @@ -1,17 +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_USE_AAPT2 := true -LOCAL_STATIC_ANDROID_LIBRARIES := androidx.legacy_legacy-support-v4 - -LOCAL_CERTIFICATE := platform - -LOCAL_PACKAGE_NAME := UsageReportingTest -LOCAL_PRIVATE_PLATFORM_APIS := true - -include $(BUILD_PACKAGE) diff --git a/tests/UsageStatsPerfTests/Android.bp b/tests/UsageStatsPerfTests/Android.bp new file mode 100644 index 000000000000..3991fb8366ac --- /dev/null +++ b/tests/UsageStatsPerfTests/Android.bp @@ -0,0 +1,26 @@ +// 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: "UsageStatsPerfTests", + srcs: ["src/**/*.java"], + static_libs: [ + "androidx.test.rules", + "apct-perftests-utils", + "services.usage", + ], + platform_apis: true, + // For android.permission.FORCE_STOP_PACKAGES permission + certificate: "platform", +} diff --git a/tests/UsageStatsPerfTests/Android.mk b/tests/UsageStatsPerfTests/Android.mk deleted file mode 100644 index 4304fb0d8e9e..000000000000 --- a/tests/UsageStatsPerfTests/Android.mk +++ /dev/null @@ -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_SRC_FILES := \ - $(call all-java-files-under, src) - -LOCAL_STATIC_JAVA_LIBRARIES := \ - androidx.test.rules \ - apct-perftests-utils \ - services.usage - -LOCAL_PACKAGE_NAME := UsageStatsPerfTests -LOCAL_PRIVATE_PLATFORM_APIS := true - -# For android.permission.FORCE_STOP_PACKAGES permission -LOCAL_CERTIFICATE := platform - -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..1b2cf638f514 --- /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", + "androidx.test.rules", + "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 aef993b9d348..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 \ - androidx.test.rules \ - 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..50b2297386cc --- /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", + "androidx.test.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 1c2d16787e88..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 \ - androidx.test.janktesthelper \ - junit - -LOCAL_JAVA_LIBRARIES := android.test.base.stubs - -LOCAL_SDK_VERSION := current - -include $(BUILD_PACKAGE) |