From 93a5458bb0c6f4f77e6f2306679bab26325d42d9 Mon Sep 17 00:00:00 2001 From: Trevor Radcliffe Date: Wed, 13 Oct 2021 20:59:12 +0000 Subject: Migrate DynamicCodeLoggerIntegrationTests to Soong Also migrates related dependencies, and needed to make a small code change to make it work. Fixes: 202986197 Test: Ran the tests Test: Treehugger Change-Id: Ie30ca52200b93d4f7bff9f60ceb0ba95d052b5c8 --- .../android/server/pm/dex/DynamicCodeLoggerIntegrationTests.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tests/DynamicCodeLoggerIntegrationTests/src') diff --git a/tests/DynamicCodeLoggerIntegrationTests/src/com/android/server/pm/dex/DynamicCodeLoggerIntegrationTests.java b/tests/DynamicCodeLoggerIntegrationTests/src/com/android/server/pm/dex/DynamicCodeLoggerIntegrationTests.java index 883c172e4990..5430dee5ca31 100644 --- a/tests/DynamicCodeLoggerIntegrationTests/src/com/android/server/pm/dex/DynamicCodeLoggerIntegrationTests.java +++ b/tests/DynamicCodeLoggerIntegrationTests/src/com/android/server/pm/dex/DynamicCodeLoggerIntegrationTests.java @@ -114,7 +114,8 @@ public final class DynamicCodeLoggerIntegrationTests { // Obtained via "echo -n copied.jar | sha256sum" String expectedNameHash = "1B6C71DB26F36582867432CCA12FB6A517470C9F9AABE9198DD4C5C030D6DC0C"; - String expectedContentHash = copyAndHashResource("/javalib.jar", privateCopyFile); + String expectedContentHash = copyAndHashResource( + "/DynamicCodeLoggerTestLibrary.jar", privateCopyFile); // Feed the jar to a class loader and make sure it contains what we expect. ClassLoader parentClassLoader = sContext.getClass().getClassLoader(); @@ -135,7 +136,8 @@ public final class DynamicCodeLoggerIntegrationTests { File privateCopyFile = privateFile("copied2.jar"); String expectedNameHash = "202158B6A3169D78F1722487205A6B036B3F2F5653FDCFB4E74710611AC7EB93"; - String expectedContentHash = copyAndHashResource("/javalib.jar", privateCopyFile); + String expectedContentHash = copyAndHashResource( + "/DynamicCodeLoggerTestLibrary.jar", privateCopyFile); // This time make sure an unknown class loader is an ancestor of the class loader we use. ClassLoader knownClassLoader = sContext.getClass().getClassLoader(); -- cgit v1.2.3-59-g8ed1b