diff options
author | Mathieu Chartier <mathieuc@google.com> | 2019-09-30 17:05:06 -0700 |
---|---|---|
committer | Mathieu Chartier <mathieuc@google.com> | 2019-10-01 19:53:19 +0000 |
commit | bafd39c1cb3ffc4210bf98baec9f61dfbbaa7ca8 (patch) | |
tree | 92650051fc14d566960c328faab3e5e1e3fe4e14 /tests/BootImageProfileTest/src | |
parent | 25f4dca660d9f74be26c6f2c1dc8796c178aca07 (diff) |
Add a test that we get samples for a common core-oj method
Test: atest frameworks/base/tests/BootImageProfileTest/src/com/android/bootimageprofile/BootImageProfileTest.java
Bug: 139883463
Change-Id: I11d0d98731756da5b9739b18acb5ab140657ca34
Diffstat (limited to 'tests/BootImageProfileTest/src')
-rw-r--r-- | tests/BootImageProfileTest/src/com/android/bootimageprofile/BootImageProfileTest.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/BootImageProfileTest/src/com/android/bootimageprofile/BootImageProfileTest.java b/tests/BootImageProfileTest/src/com/android/bootimageprofile/BootImageProfileTest.java index 730b210f1529..fe1d9d26c7e7 100644 --- a/tests/BootImageProfileTest/src/com/android/bootimageprofile/BootImageProfileTest.java +++ b/tests/BootImageProfileTest/src/com/android/bootimageprofile/BootImageProfileTest.java @@ -92,5 +92,18 @@ public class BootImageProfileTest implements IDeviceTest { } assertTrue("Did not see framework.jar in " + res, sawFramework); assertTrue("Did not see services.jar in " + res, sawServices); + + + // Test the profile contents contain common methods for core-oj that would normally be AOT + // compiled. + res = mTestDevice.executeShellCommand("profman --dump-classes-and-methods --profile-file=" + + SYSTEM_SERVER_PROFILE + " --apk=/apex/com.android.art/javalib/core-oj.jar"); + boolean sawObjectInit = false; + for (String line : res.split("\n")) { + if (line.contains("Ljava/lang/Object;-><init>()V")) { + sawObjectInit = true; + } + } + assertTrue("Did not see Object.<init> in " + res, sawObjectInit); } } |