Fix test dependencies for AppEnumerationInternalTests
All of a test's dependencies should be explicitly declared in the Soong build module to enable infrastructure features that ensure correctness and optimize runtime. Here in the test config file, AppEnumerationInternalTests uses `AppEnumerationSyncProviderTestApp.apk`, so that this change declares `AppEnumerationSyncProviderTestApp` in the Soong build module.
Besides, this change modifies the test config file by switching to use `PushFilePreparer` instead of `FilePusher`, since `FilePusher` is designed for the tests that are part of compatibility suite and AppEnumerationInternalTests is not.
Bug: 222438068
Test: atest-src AppEnumerationInternalTests \
--experimental-device-driven-test \
--experimental-java-runtime-dependencies \
--bazel-arg=--test_timeout=48000
Test: atest AppEnumerationInternalTests
Change-Id: I8f09efe82b8dbd11d900752c3810d9215026062e
diff --git a/services/tests/PackageManagerServiceTests/appenumeration/Android.bp b/services/tests/PackageManagerServiceTests/appenumeration/Android.bp
index 479ef8e..c3cce96 100644
--- a/services/tests/PackageManagerServiceTests/appenumeration/Android.bp
+++ b/services/tests/PackageManagerServiceTests/appenumeration/Android.bp
@@ -33,4 +33,5 @@
],
platform_apis: true,
test_suites: ["device-tests"],
+ data: [":AppEnumerationSyncProviderTestApp"],
}
diff --git a/services/tests/PackageManagerServiceTests/appenumeration/AndroidTest.xml b/services/tests/PackageManagerServiceTests/appenumeration/AndroidTest.xml
index 6f168a3..5bcf2e3 100644
--- a/services/tests/PackageManagerServiceTests/appenumeration/AndroidTest.xml
+++ b/services/tests/PackageManagerServiceTests/appenumeration/AndroidTest.xml
@@ -30,7 +30,7 @@
</target_preparer>
<!-- Load additional APKs onto device -->
- <target_preparer class="com.android.compatibility.common.tradefed.targetprep.FilePusher">
+ <target_preparer class="com.android.tradefed.targetprep.PushFilePreparer">
<option name="push" value="AppEnumerationSyncProviderTestApp.apk->/data/local/tmp/appenumerationtests/AppEnumerationSyncProviderTestApp.apk" />
</target_preparer>