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
This commit is contained in:
Yike
2022-07-21 12:49:23 +08:00
parent 2fd4ee6439
commit 55f2c7f1a1
2 changed files with 2 additions and 1 deletions

View File

@@ -33,4 +33,5 @@ android_test {
],
platform_apis: true,
test_suites: ["device-tests"],
data: [":AppEnumerationSyncProviderTestApp"],
}

View File

@@ -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>