summaryrefslogtreecommitdiff
path: root/ravenwood/junit-impl-src/android
diff options
context:
space:
mode:
author Makoto Onuki <omakoto@google.com> 2024-11-22 12:21:52 -0800
committer Makoto Onuki <omakoto@google.com> 2024-11-25 08:52:54 -0800
commita07975e72e50d17b8231cdab05e7cab104180da2 (patch)
tree62922ddea063c77d8db15e4c9816d947b2409495 /ravenwood/junit-impl-src/android
parentaaee6ced74650327ff817846f41935c32447033c (diff)
Make the log format more realistic
Now the log format is mostly same as the device one. Flag: EXEMPT host test change only Bug: 292141694 Test: atest RavenwoodBivalentTest Change-Id: I569b4b042f7c567f263b5638933ad90c6e1e5f7d
Diffstat (limited to 'ravenwood/junit-impl-src/android')
-rw-r--r--ravenwood/junit-impl-src/android/platform/test/ravenwood/RavenwoodRuntimeEnvironmentController.java9
1 files changed, 6 insertions, 3 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 c2ed45d8f427..8c9f30ba262b 100644
--- a/ravenwood/junit-impl-src/android/platform/test/ravenwood/RavenwoodRuntimeEnvironmentController.java
+++ b/ravenwood/junit-impl-src/android/platform/test/ravenwood/RavenwoodRuntimeEnvironmentController.java
@@ -58,6 +58,7 @@ import android.provider.DeviceConfig_host;
import android.system.ErrnoException;
import android.system.Os;
import android.util.Log;
+import android.util.Log_ravenwood;
import android.view.DisplayAdjustments;
import androidx.test.platform.app.InstrumentationRegistry;
@@ -219,6 +220,9 @@ public class RavenwoodRuntimeEnvironmentController {
// Some process-wide initialization. (maybe redirect stdout/stderr)
RavenwoodCommonUtils.loadJniLibrary(LIBRAVENWOOD_INITIALIZER_NAME);
+ // Redirect stdout/stdin to the Log API.
+ RuntimeInit.redirectLogStreams();
+
dumpCommandLineArgs();
// We haven't initialized liblog yet, so directly write to System.out here.
@@ -232,6 +236,8 @@ public class RavenwoodRuntimeEnvironmentController {
// Make sure libravenwood_runtime is loaded.
System.load(RavenwoodCommonUtils.getJniLibraryPath(RAVENWOOD_NATIVE_RUNTIME_NAME));
+ Log_ravenwood.onRavenwoodRuntimeNativeReady();
+
// Do the basic set up for the android sysprops.
RavenwoodSystemProperties.initialize();
setSystemProperties(null);
@@ -250,9 +256,6 @@ public class RavenwoodRuntimeEnvironmentController {
// Make sure libandroid_runtime is loaded.
RavenwoodNativeLoader.loadFrameworkNativeCode();
- // Redirect stdout/stdin to liblog.
- RuntimeInit.redirectLogStreams();
-
// Touch some references early to ensure they're <clinit>'ed
Objects.requireNonNull(Build.TYPE);
Objects.requireNonNull(Build.VERSION.SDK);