diff options
author | 2025-03-07 10:02:05 -0800 | |
---|---|---|
committer | 2025-03-07 10:33:42 -0800 | |
commit | 884ec2de1406a1b9979e653d47229da221e7f14f (patch) | |
tree | 2b7805bb2f24fc18d39b910bfc4baf9b82191e2b /ravenwood/junit-impl-src/android | |
parent | ccb970ba18891d44d710a3ed6c7a0185cfd69668 (diff) |
Add tests for resource flags
- Flags work, except all RW flags are treated as "enabled".
- Also enable tests that no longer need to be disabled
- Also added a java system prop that has the runtime directory
path
Bug: 396458006
Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh -s
Flag: EXEMPT host test change only
Change-Id: I0402da0ba59c27c17b6dd4d2f646cdee7800a290
Diffstat (limited to 'ravenwood/junit-impl-src/android')
-rw-r--r-- | ravenwood/junit-impl-src/android/platform/test/ravenwood/RavenwoodRuntimeEnvironmentController.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/ravenwood/junit-impl-src/android/platform/test/ravenwood/RavenwoodRuntimeEnvironmentController.java b/ravenwood/junit-impl-src/android/platform/test/ravenwood/RavenwoodRuntimeEnvironmentController.java index d935626c34df..d8741975c71a 100644 --- a/ravenwood/junit-impl-src/android/platform/test/ravenwood/RavenwoodRuntimeEnvironmentController.java +++ b/ravenwood/junit-impl-src/android/platform/test/ravenwood/RavenwoodRuntimeEnvironmentController.java @@ -23,7 +23,9 @@ import static android.platform.test.ravenwood.RavenwoodSystemServer.ANDROID_PACK import static com.android.ravenwood.common.RavenwoodCommonUtils.RAVENWOOD_EMPTY_RESOURCES_APK; import static com.android.ravenwood.common.RavenwoodCommonUtils.RAVENWOOD_INST_RESOURCE_APK; import static com.android.ravenwood.common.RavenwoodCommonUtils.RAVENWOOD_RESOURCE_APK; +import static com.android.ravenwood.common.RavenwoodCommonUtils.RAVENWOOD_RUNTIME_PATH_JAVA_SYSPROP; import static com.android.ravenwood.common.RavenwoodCommonUtils.RAVENWOOD_VERSION_JAVA_SYSPROP; +import static com.android.ravenwood.common.RavenwoodCommonUtils.getRavenwoodRuntimePath; import static com.android.ravenwood.common.RavenwoodCommonUtils.parseNullableInt; import static com.android.ravenwood.common.RavenwoodCommonUtils.withDefault; @@ -271,6 +273,13 @@ public class RavenwoodRuntimeEnvironmentController { dumpJavaProperties(); dumpOtherInfo(); + System.setProperty(RAVENWOOD_VERSION_JAVA_SYSPROP, "1"); + var runtimePath = getRavenwoodRuntimePath(); + System.setProperty(RAVENWOOD_RUNTIME_PATH_JAVA_SYSPROP, runtimePath); + + Log.i(TAG, "PWD=" + System.getProperty("user.dir")); + Log.i(TAG, "RuntimePath=" + runtimePath); + // Make sure libravenwood_runtime is loaded. System.load(RavenwoodCommonUtils.getJniLibraryPath(RAVENWOOD_NATIVE_RUNTIME_NAME)); @@ -314,7 +323,6 @@ public class RavenwoodRuntimeEnvironmentController { Typeface.loadPreinstalledSystemFontMap(); Typeface.loadNativeSystemFonts(); - System.setProperty(RAVENWOOD_VERSION_JAVA_SYSPROP, "1"); // This will let AndroidJUnit4 use the original runner. System.setProperty("android.junit.runner", "androidx.test.internal.runner.junit4.AndroidJUnit4ClassRunner"); |