From 55f2c7f1a13cc933f4047f0736b536a04918480e Mon Sep 17 00:00:00 2001 From: Yike Date: Thu, 21 Jul 2022 12:49:23 +0800 Subject: [PATCH] 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 --- .../tests/PackageManagerServiceTests/appenumeration/Android.bp | 1 + .../PackageManagerServiceTests/appenumeration/AndroidTest.xml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/services/tests/PackageManagerServiceTests/appenumeration/Android.bp b/services/tests/PackageManagerServiceTests/appenumeration/Android.bp index 479ef8e5f1880..c3cce9619ae8b 100644 --- a/services/tests/PackageManagerServiceTests/appenumeration/Android.bp +++ b/services/tests/PackageManagerServiceTests/appenumeration/Android.bp @@ -33,4 +33,5 @@ android_test { ], 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 6f168a3888b33..5bcf2e3516623 100644 --- a/services/tests/PackageManagerServiceTests/appenumeration/AndroidTest.xml +++ b/services/tests/PackageManagerServiceTests/appenumeration/AndroidTest.xml @@ -30,7 +30,7 @@ - +