From 8d3b7a4d45992c7af409c0dbcfc1d29ece1ce44e Mon Sep 17 00:00:00 2001 From: Alan Stokes Date: Tue, 19 Feb 2019 17:14:42 +0000 Subject: Rename test class to match code. Renaming DexLoggerIntegrationTests to DynamicCodeLoggerIntegrationTests, to match the rename and changed scope of the code it is testing. Test: atest -p services/core/java/com/android/server/pm/dex Bug: 122946463 Change-Id: I66abd6b173f148279085dee7a714aa64df7a941b --- tests/DynamicCodeLoggerIntegrationTests/Android.mk | 84 ++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 tests/DynamicCodeLoggerIntegrationTests/Android.mk (limited to 'tests/DynamicCodeLoggerIntegrationTests/Android.mk') diff --git a/tests/DynamicCodeLoggerIntegrationTests/Android.mk b/tests/DynamicCodeLoggerIntegrationTests/Android.mk new file mode 100644 index 000000000000..f324eb10a7b0 --- /dev/null +++ b/tests/DynamicCodeLoggerIntegrationTests/Android.mk @@ -0,0 +1,84 @@ +# +# Copyright 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) + +# Build a tiny library that the test app can dynamically load + +include $(CLEAR_VARS) + +LOCAL_MODULE_TAGS := tests +LOCAL_MODULE := DynamicCodeLoggerTestLibrary +LOCAL_SRC_FILES := $(call all-java-files-under, src/com/android/dcl) + +include $(BUILD_JAVA_LIBRARY) + +dynamiccodeloggertest_jar := $(LOCAL_BUILT_MODULE) + + +# Also build a native library that the test app can dynamically load + +include $(CLEAR_VARS) + +LOCAL_MODULE_TAGS := tests +LOCAL_MODULE := DynamicCodeLoggerNativeTestLibrary +LOCAL_SRC_FILES := src/cpp/com_android_dcl_Jni.cpp +LOCAL_C_INCLUDES += \ + $(JNI_H_INCLUDE) +LOCAL_SDK_VERSION := 28 +LOCAL_NDK_STL_VARIANT := c++_static + +include $(BUILD_SHARED_LIBRARY) + +# And a standalone native executable that we can exec. + +include $(CLEAR_VARS) + +LOCAL_MODULE_TAGS := tests +LOCAL_MODULE := DynamicCodeLoggerNativeExecutable +LOCAL_SRC_FILES := src/cpp/test_executable.cpp + +include $(BUILD_EXECUTABLE) + +dynamiccodeloggertest_executable := $(LOCAL_BUILT_MODULE) + +# Build the test app itself + +include $(CLEAR_VARS) + +LOCAL_MODULE_TAGS := tests +LOCAL_PACKAGE_NAME := DynamicCodeLoggerIntegrationTests +LOCAL_SDK_VERSION := current +LOCAL_COMPATIBILITY_SUITE := device-tests +LOCAL_CERTIFICATE := shared +LOCAL_SRC_FILES := $(call all-java-files-under, src/com/android/server/pm) + +LOCAL_STATIC_JAVA_LIBRARIES := \ + android-support-test \ + truth-prebuilt \ + +# Include both versions of the .so if we have 2 arch +LOCAL_MULTILIB := both +LOCAL_JNI_SHARED_LIBRARIES := \ + DynamicCodeLoggerNativeTestLibrary \ + +# This gets us the javalib.jar built by DynamicCodeLoggerTestLibrary above as well as the various +# native binaries. +LOCAL_JAVA_RESOURCE_FILES := \ + $(dynamiccodeloggertest_jar) \ + $(dynamiccodeloggertest_executable) \ + +include $(BUILD_PACKAGE) -- cgit v1.2.3-59-g8ed1b From 502ec7ae4bf0aa26e34a01efdf81116de6907809 Mon Sep 17 00:00:00 2001 From: Brett Chabot Date: Fri, 1 Mar 2019 14:43:20 -0800 Subject: Migrate remainder of frameworks/base to androidx.test See go/jetpack-test-android-migration Exempt-From-Owner-Approval: automated package name refactoring Test: m m -j BroadcastRadioTests KeystoreTests mediaframeworktest ActivityManagerPerfTests AppLaunch AppLaunchWear BackgroundDexOptServiceIntegrationTests AppCompatibilityTest DynamicCodeLoggerIntegrationTests FlickerLibTest InternalTests PackageWatchdogTest RcsTests RollbackTestAppAv1 RollbackTestAppAv2 RollbackTestAppACrashingV2 RollbackTestAppBv1 RollbackTestAppBv2 RollbackTestAppASplitV1 RollbackTestAppASplitV2 RollbackTest ServiceCrashTest UsageStatsPerfTests UsbTests WindowAnimationJank Change-Id: I32fe3297656eec6060da6c7e24582bcd5315fb16 --- core/tests/BroadcastRadioTests/Android.mk | 2 +- keystore/tests/Android.mk | 2 +- keystore/tests/AndroidManifest.xml | 2 +- .../ParcelableKeyGenParameterSpecTest.java | 12 ++++--- .../security/keystore/KeyGenParameterSpecTest.java | 6 ++-- media/tests/MediaFrameworkTest/Android.mk | 2 +- media/tests/MediaFrameworkTest/AndroidManifest.xml | 2 +- media/tests/MediaFrameworkTest/AndroidTest.xml | 2 +- .../mediaframeworktest/unit/MediaFileTest.java | 3 +- services/tests/runtests.py | 2 +- startop/iorap/tests/Android.bp | 2 +- startop/iorap/tests/AndroidManifest.xml | 2 +- startop/iorap/tests/AndroidTest.xml | 2 +- .../android/startop/iorap/IIorapIntegrationTest.kt | 37 +++++++++++----------- .../android/startop/iorap/ParcelablesTest.kt | 20 ++++++------ startop/view_compiler/dex_builder_test/Android.bp | 2 +- .../dex_builder_test/AndroidManifest.xml | 2 +- .../view_compiler/dex_builder_test/AndroidTest.xml | 2 +- .../src/android/startop/test/DexBuilderTest.java | 12 +++---- .../android/startop/test/LayoutCompilerTest.java | 15 ++++----- tests/ActivityManagerPerfTests/tests/Android.mk | 2 +- .../tests/AndroidManifest.xml | 2 +- .../ActivityManagerPerfTests/tests/AndroidTest.xml | 2 +- .../perftests/am/tests/BasePerfTest.java | 3 +- .../perftests/am/tests/BroadcastPerfTest.java | 5 +-- .../am/tests/ContentProviderPerfTest.java | 5 +-- .../perftests/am/tests/ServiceBindPerfTest.java | 5 +-- .../perftests/am/tests/ServiceStartPerfTest.java | 5 +-- tests/ActivityManagerPerfTests/utils/Android.mk | 2 +- .../frameworks/perftests/am/util/Utils.java | 3 +- tests/AppLaunch/Android.mk | 2 +- .../src/com/android/tests/applaunch/AppLaunch.java | 4 ++- tests/AppLaunchWear/Android.mk | 2 +- .../src/com/android/tests/applaunch/AppLaunch.java | 5 +-- .../Android.mk | 2 +- .../AndroidManifest.xml | 2 +- .../AndroidTest.xml | 2 +- .../BackgroundDexOptServiceIntegrationTests.java | 5 ++- tests/Camera2Tests/CameraToo/tests/Android.mk | 2 +- .../CameraToo/tests/AndroidManifest.xml | 2 +- tests/Compatibility/Android.mk | 2 +- .../compatibilitytest/AppCompatibility.java | 5 +-- .../compatibilitytest/AppCompatibilityRunner.java | 2 +- tests/DynamicCodeLoggerIntegrationTests/Android.mk | 2 +- .../AndroidManifest.xml | 2 +- .../AndroidTest.xml | 2 +- .../pm/dex/DynamicCodeLoggerIntegrationTests.java | 5 +-- tests/FlickerTests/AndroidManifest.xml | 2 +- tests/FlickerTests/lib/Android.mk | 4 +-- .../android/server/wm/flicker/AutomationUtils.java | 3 +- .../server/wm/flicker/TransitionRunner.java | 3 +- .../com/android/server/wm/flicker/WindowUtils.java | 3 +- .../monitor/WindowAnimationFrameStatsMonitor.java | 2 +- tests/FlickerTests/lib/test/Android.mk | 2 +- tests/FlickerTests/lib/test/AndroidManifest.xml | 2 +- .../android/server/wm/flicker/LayersTraceTest.java | 3 +- .../android/server/wm/flicker/TestFileUtils.java | 3 +- .../WindowAnimationFrameStatsMonitorTest.java | 4 +-- .../server/wm/flicker/ChangeAppRotationTest.java | 5 +-- .../server/wm/flicker/CloseImeWindowToAppTest.java | 7 ++-- .../wm/flicker/CloseImeWindowToHomeTest.java | 7 ++-- .../server/wm/flicker/CommonTransitions.java | 3 +- .../com/android/server/wm/flicker/DebugTest.java | 5 +-- .../android/server/wm/flicker/FlickerTestBase.java | 3 +- .../android/server/wm/flicker/OpenAppColdTest.java | 6 ++-- .../wm/flicker/OpenAppToSplitScreenTest.java | 6 ++-- .../android/server/wm/flicker/OpenAppWarmTest.java | 6 ++-- .../server/wm/flicker/OpenImeWindowTest.java | 4 +-- .../server/wm/flicker/ResizeSplitScreenTest.java | 7 ++-- .../server/wm/flicker/SeamlessAppRotationTest.java | 5 +-- .../wm/flicker/SplitScreenToLauncherTest.java | 8 ++--- tests/Internal/Android.mk | 2 +- tests/Internal/AndroidManifest.xml | 2 +- tests/Internal/AndroidTest.xml | 2 +- .../src/android/app/WallpaperColorsTest.java | 5 +-- .../src/android/app/WallpaperInfoTest.java | 7 ++-- .../service/wallpaper/WallpaperServiceTest.java | 2 +- .../colorextraction/ColorExtractorTest.java | 7 ++-- .../internal/colorextraction/types/TonalTest.java | 7 ++-- .../android/internal/graphics/ColorUtilsTest.java | 7 ++-- .../android/internal/ml/clustering/KMeansTest.java | 5 +-- tests/PackageWatchdog/Android.mk | 2 +- tests/PackageWatchdog/AndroidManifest.xml | 2 +- .../com/android/server/PackageWatchdogTest.java | 3 +- tests/RcsTests/Android.mk | 2 +- tests/RcsTests/AndroidManifest.xml | 2 +- .../ims/RcsGroupThreadIconChangedEventTest.java | 3 +- .../ims/RcsGroupThreadNameChangedEventTest.java | 3 +- .../RcsGroupThreadParticipantJoinedEventTest.java | 3 +- .../RcsGroupThreadParticipantLeftEventTest.java | 3 +- .../ims/RcsParticipantAliasChangedEventTest.java | 3 +- .../tests/ims/RcsParticipantQueryParamsTest.java | 3 +- .../tests/ims/RcsThreadQueryParamsTest.java | 3 +- tests/RollbackTest/Android.mk | 2 +- tests/RollbackTest/RollbackTest.xml | 2 +- .../RollbackTest/RollbackTest/AndroidManifest.xml | 2 +- .../android/tests/rollback/LocalIntentSender.java | 3 +- .../tests/rollback/RollbackBroadcastReceiver.java | 3 +- .../com/android/tests/rollback/RollbackTest.java | 11 ++++--- .../android/tests/rollback/RollbackTestUtils.java | 11 ++++--- tests/ServiceCrashTest/Android.mk | 2 +- tests/UsageStatsPerfTests/Android.mk | 2 +- tests/UsageStatsPerfTests/AndroidManifest.xml | 2 +- tests/UsageStatsPerfTests/AndroidTest.xml | 2 +- .../usage/tests/UsageStatsDatabasePerfTest.java | 7 ++-- tests/UsbTests/Android.mk | 2 +- tests/UsbTests/AndroidManifest.xml | 2 +- tests/UsbTests/AndroidTest.xml | 2 +- .../server/usb/UsbDescriptorParserTests.java | 20 ++++++------ .../src/com/android/server/usb/UsbHandlerTest.java | 8 ++--- tests/WindowAnimationJank/Android.mk | 2 +- .../FullscreenRotationTest.java | 5 +-- .../WindowAnimationJankTestBase.java | 6 ++-- 113 files changed, 265 insertions(+), 225 deletions(-) (limited to 'tests/DynamicCodeLoggerIntegrationTests/Android.mk') diff --git a/core/tests/BroadcastRadioTests/Android.mk b/core/tests/BroadcastRadioTests/Android.mk index 6b0484ec366d..faffc4b28a58 100644 --- a/core/tests/BroadcastRadioTests/Android.mk +++ b/core/tests/BroadcastRadioTests/Android.mk @@ -25,7 +25,7 @@ LOCAL_MODULE_TAGS := tests # LOCAL_SDK_VERSION := current LOCAL_PRIVATE_PLATFORM_APIS := true -LOCAL_STATIC_JAVA_LIBRARIES := compatibility-device-util androidx.test.rules testng +LOCAL_STATIC_JAVA_LIBRARIES := compatibility-device-util-axt androidx.test.rules testng LOCAL_JAVA_LIBRARIES := android.test.base diff --git a/keystore/tests/Android.mk b/keystore/tests/Android.mk index 596e5f530970..99d3197f8bf3 100644 --- a/keystore/tests/Android.mk +++ b/keystore/tests/Android.mk @@ -21,7 +21,7 @@ LOCAL_MODULE_TAGS := tests LOCAL_SRC_FILES := $(call all-java-files-under, src) LOCAL_STATIC_JAVA_LIBRARIES := \ - android-support-test + androidx.test.rules hamcrest-library LOCAL_PACKAGE_NAME := KeystoreTests LOCAL_PRIVATE_PLATFORM_APIS := true diff --git a/keystore/tests/AndroidManifest.xml b/keystore/tests/AndroidManifest.xml index 9bf2d0c761e6..6833cd1e35b9 100644 --- a/keystore/tests/AndroidManifest.xml +++ b/keystore/tests/AndroidManifest.xml @@ -20,7 +20,7 @@ - diff --git a/keystore/tests/src/android/security/ParcelableKeyGenParameterSpecTest.java b/keystore/tests/src/android/security/ParcelableKeyGenParameterSpecTest.java index 32f8ec44d11f..fca2775a34bb 100644 --- a/keystore/tests/src/android/security/ParcelableKeyGenParameterSpecTest.java +++ b/keystore/tests/src/android/security/ParcelableKeyGenParameterSpecTest.java @@ -22,16 +22,20 @@ import static org.junit.Assert.assertThat; import android.os.Parcel; import android.security.keystore.KeyGenParameterSpec; -import android.security.keystore.ParcelableKeyGenParameterSpec; import android.security.keystore.KeyProperties; -import android.support.test.runner.AndroidJUnit4; +import android.security.keystore.ParcelableKeyGenParameterSpec; + +import androidx.test.runner.AndroidJUnit4; + +import org.junit.Test; +import org.junit.runner.RunWith; + import java.math.BigInteger; import java.security.spec.ECGenParameterSpec; import java.security.spec.RSAKeyGenParameterSpec; import java.util.Date; + import javax.security.auth.x500.X500Principal; -import org.junit.Test; -import org.junit.runner.RunWith; /** Unit tests for {@link ParcelableKeyGenParameterSpec}. */ @RunWith(AndroidJUnit4.class) diff --git a/keystore/tests/src/android/security/keystore/KeyGenParameterSpecTest.java b/keystore/tests/src/android/security/keystore/KeyGenParameterSpecTest.java index 865cad472eb5..b2edfd05d13f 100644 --- a/keystore/tests/src/android/security/keystore/KeyGenParameterSpecTest.java +++ b/keystore/tests/src/android/security/keystore/KeyGenParameterSpecTest.java @@ -20,10 +20,12 @@ import static org.hamcrest.Matchers.is; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertThat; +import android.security.ParcelableKeyGenParameterSpecTest; import android.security.keystore.KeyGenParameterSpec; import android.security.keystore.KeyProperties; -import android.security.ParcelableKeyGenParameterSpecTest; -import android.support.test.runner.AndroidJUnit4; + +import androidx.test.runner.AndroidJUnit4; + import org.junit.Test; import org.junit.runner.RunWith; diff --git a/media/tests/MediaFrameworkTest/Android.mk b/media/tests/MediaFrameworkTest/Android.mk index fb473f0581c9..167d255af74c 100644 --- a/media/tests/MediaFrameworkTest/Android.mk +++ b/media/tests/MediaFrameworkTest/Android.mk @@ -9,7 +9,7 @@ LOCAL_JAVA_LIBRARIES := android.test.runner android.test.base LOCAL_STATIC_JAVA_LIBRARIES := \ mockito-target-minus-junit4 \ - android-support-test \ + androidx.test.rules \ android-ex-camera2 LOCAL_PACKAGE_NAME := mediaframeworktest diff --git a/media/tests/MediaFrameworkTest/AndroidManifest.xml b/media/tests/MediaFrameworkTest/AndroidManifest.xml index e50a3757d14f..fb2d630faaf6 100644 --- a/media/tests/MediaFrameworkTest/AndroidManifest.xml +++ b/media/tests/MediaFrameworkTest/AndroidManifest.xml @@ -86,7 +86,7 @@ android:label="MediaFramework integration tests InstrumentationRunner"> - diff --git a/media/tests/MediaFrameworkTest/AndroidTest.xml b/media/tests/MediaFrameworkTest/AndroidTest.xml index 204959ff2749..132028ce98dc 100644 --- a/media/tests/MediaFrameworkTest/AndroidTest.xml +++ b/media/tests/MediaFrameworkTest/AndroidTest.xml @@ -21,7 +21,7 @@