Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 97ab1d48 authored by Makoto Onuki's avatar Makoto Onuki Committed by Android (Google) Code Review
Browse files

Merge "Rename RREC to RavenwoodDriver" into main

parents b59e0148 c7693ac4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -109,7 +109,7 @@ public final class RavenwoodAwareTestRunner extends RavenwoodAwareTestRunnerBase
     * Constructor.
     */
    public RavenwoodAwareTestRunner(Class<?> testClass) {
        RavenwoodRuntimeEnvironmentController.globalInitOnce();
        RavenwoodDriver.globalInitOnce();
        mTestJavaClass = testClass;

        /*
+6 −6
Original line number Diff line number Diff line
@@ -101,10 +101,10 @@ import java.util.stream.Collectors;
/**
 * Responsible for initializing and the environment.
 */
public class RavenwoodRuntimeEnvironmentController {
public class RavenwoodDriver {
    private static final String TAG = com.android.ravenwood.common.RavenwoodCommonUtils.TAG;

    private RavenwoodRuntimeEnvironmentController() {
    private RavenwoodDriver() {
    }

    private static final PrintStream sStdOut = System.out;
@@ -277,7 +277,7 @@ public class RavenwoodRuntimeEnvironmentController {

        if (ENABLE_UNCAUGHT_EXCEPTION_DETECTION) {
            Thread.setDefaultUncaughtExceptionHandler(
                    RavenwoodRuntimeEnvironmentController::onUncaughtException);
                    RavenwoodDriver::onUncaughtException);
        }

        // Some process-wide initialization:
@@ -365,7 +365,7 @@ public class RavenwoodRuntimeEnvironmentController {
        final var main = new HandlerThread(MAIN_THREAD_NAME);
        sMainThread = main;
        main.start();
        Looper_ravenwood.sDispatcher = RavenwoodRuntimeEnvironmentController::dispatchMessage;
        Looper_ravenwood.sDispatcher = RavenwoodDriver::dispatchMessage;
        Looper.setMainLooperForTest(main.getLooper());

        final boolean isSelfInstrumenting =
@@ -524,7 +524,7 @@ public class RavenwoodRuntimeEnvironmentController {
        cancelTimeout();

        sPendingTimeout = sTimeoutExecutor.schedule(
                RavenwoodRuntimeEnvironmentController::onTestTimedOut,
                RavenwoodDriver::onTestTimedOut,
                TIMEOUT_MILLIS, TimeUnit.MILLISECONDS);
    }

@@ -585,7 +585,7 @@ public class RavenwoodRuntimeEnvironmentController {
                emptyPaths, emptyPaths, emptyPaths,
                emptyPaths, null, null,
                new DisplayAdjustments().getCompatibilityInfo(),
                RavenwoodRuntimeEnvironmentController.class.getClassLoader(), null);
                RavenwoodDriver.class.getClassLoader(), null);

        assertNotNull(ret);

+4 −4
Original line number Diff line number Diff line
@@ -64,7 +64,7 @@ public final class RavenwoodRunnerState {
        if (RAVENWOOD_VERBOSE_LOGGING) {
            Log.v(TAG, "enterTestRunner: " + mRunner);
        }
        RavenwoodRuntimeEnvironmentController.initForRunner();
        RavenwoodDriver.initForRunner();
    }

    public void enterTestClass() {
@@ -78,18 +78,18 @@ public final class RavenwoodRunnerState {
            Log.v(TAG, "exitTestClass: " + mRunner.mTestJavaClass.getName());
        }
        assertTrue(RAVENWOOD_RULE_ERROR, sActiveProperties.isEmpty());
        RavenwoodRuntimeEnvironmentController.exitTestClass();
        RavenwoodDriver.exitTestClass();
    }

    /** Called when a test method is about to start */
    public void enterTestMethod(Description description) {
        mMethodDescription = description;
        RavenwoodRuntimeEnvironmentController.enterTestMethod(description);
        RavenwoodDriver.enterTestMethod(description);
    }

    /** Called when a test method finishes */
    public void exitTestMethod(Description description) {
        RavenwoodRuntimeEnvironmentController.exitTestMethod(description);
        RavenwoodDriver.exitTestMethod(description);
        mMethodDescription = null;
    }

+1 −1
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@ public class ClassLoadHook {
        // Always try to initialize the environment in case classes are loaded before
        // RavenwoodAwareTestRunner is initialized
        try {
            Class.forName("android.platform.test.ravenwood.RavenwoodRuntimeEnvironmentController")
            Class.forName("android.platform.test.ravenwood.RavenwoodDriver")
                    .getMethod("globalInitOnce").invoke(null);
        } catch (ReflectiveOperationException ignored) {
        }
+1 −1
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@

constexpr const char* kCommonUtils = "com/android/ravenwood/common/RavenwoodCommonUtils";
constexpr const char* kRuntimeEnvController =
        "android/platform/test/ravenwood/RavenwoodRuntimeEnvironmentController";
        "android/platform/test/ravenwood/RavenwoodDriver";
constexpr const char* kRunnerState = "android/platform/test/ravenwood/RavenwoodRunnerState";
constexpr const char* kRuntimeNative = "com/android/ravenwood/RavenwoodRuntimeNative";

Loading