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

Commit ae412804 authored by Jiyong Park's avatar Jiyong Park
Browse files

Run the console test with /dev/null

The availability of /dev/console varies across different devices and
even across different build variants (ex: userdebug/user). Instead of
relying on the device-specific condition, use the /dev/null as the
console device for the test.

Bug: 262090304
Test: atest CtsInitTestCases on raven-user
Change-Id: I3b12d66e94609328dfdd6f640d1adb88a773fa38
parent 6dfeccf9
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -194,13 +194,10 @@ service A something
}

TEST(init, StartConsole) {
    if (access("/dev/console", F_OK) < 0) {
        GTEST_SKIP() << "/dev/console not found";
    }
    std::string init_script = R"init(
service console /system/bin/sh
    class core
    console console
    console null
    disabled
    user root
    group root shell log readproc