nixosTests.kmscon: wait for multi-user.target and check $TERM

This commit is contained in:
ccicnce113424
2026-02-09 20:23:18 +08:00
parent e00ac658db
commit 06d12de35a
+3 -2
View File
@@ -29,8 +29,7 @@
enableOCR = true;
testScript = ''
machine.succeed(":")
# ^ this create a screen
machine.wait_for_unit("multi-user.target")
with subtest("ensure we can open a tty"):
machine.wait_for_text("machine login:")
@@ -38,6 +37,8 @@
machine.wait_for_text("Password:")
machine.send_chars("foobar\n")
machine.wait_for_text("alice@machine")
machine.send_chars("echo $TERM\n")
machine.wait_for_text("xterm-256color")
machine.screenshot("tty.png")
'';
}