From ebf48bf1e29bd07ac2aa5bafdc122a88c2035e22 Mon Sep 17 00:00:00 2001 From: Jiakai Zhang Date: Fri, 10 Feb 2023 01:51:53 +0800 Subject: Properly check the deapexed files in tests. The tests in bootclasspath_fragment_test setup the environment to have two APEXes: a source one and a prebuilt one. Before this change, the tests for prebuilt incorrectly check the contents in the source one. This change introduces a new function that properly checks files deapexed from the prebuilt one. Bug: 241823638 Test: m nothing Change-Id: I1865c20b198d50e7ebc8ebfb9f7c71394a225ab7 --- apex/bootclasspath_fragment_test.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'apex/bootclasspath_fragment_test.go') diff --git a/apex/bootclasspath_fragment_test.go b/apex/bootclasspath_fragment_test.go index af4fd9f27..2ddfd0305 100644 --- a/apex/bootclasspath_fragment_test.go +++ b/apex/bootclasspath_fragment_test.go @@ -530,9 +530,8 @@ func TestBootclasspathFragmentInArtApex(t *testing.T) { java.FixtureSetBootImageInstallDirOnDevice("art", "apex/com.android.art/javalib"), ).RunTest(t) - ensureExactContents(t, result.TestContext, "com.android.art", "android_common_com.android.art_image", []string{ + ensureExactDeapexedContents(t, result.TestContext, "com.android.art", "android_common", []string{ "etc/boot-image.prof", - "etc/classpaths/bootclasspath.pb", "javalib/arm/boot.art", "javalib/arm/boot.oat", "javalib/arm/boot.vdex", @@ -592,9 +591,8 @@ func TestBootclasspathFragmentInArtApex(t *testing.T) { java.FixtureSetBootImageInstallDirOnDevice("art", "system/framework"), ).RunTest(t) - ensureExactContents(t, result.TestContext, "com.android.art", "android_common_com.android.art_image", []string{ + ensureExactDeapexedContents(t, result.TestContext, "com.android.art", "android_common", []string{ "etc/boot-image.prof", - "etc/classpaths/bootclasspath.pb", "javalib/bar.jar", "javalib/foo.jar", }) -- cgit v1.2.3-59-g8ed1b