nixosTests.kmscon: improve term test
This commit is contained in:
@@ -33,12 +33,18 @@
|
||||
|
||||
with subtest("ensure we can open a tty"):
|
||||
machine.wait_for_text("machine login:")
|
||||
|
||||
machine.send_chars("alice\n")
|
||||
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.send_chars("echo $TERM | tee /tmp/term.txt\n")
|
||||
machine.wait_until_succeeds("test -s /tmp/term.txt")
|
||||
term = machine.succeed("cat /tmp/term.txt").strip()
|
||||
assert term == "xterm-256color", f"Unexpected TERM value: {term!r}"
|
||||
|
||||
machine.screenshot("tty.png")
|
||||
'';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user