From 06d12de35ab46bd159adf75d5937520de8f5f559 Mon Sep 17 00:00:00 2001 From: ccicnce113424 Date: Mon, 9 Feb 2026 20:01:32 +0800 Subject: [PATCH] nixosTests.kmscon: wait for `multi-user.target` and check `$TERM` --- nixos/tests/kmscon.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nixos/tests/kmscon.nix b/nixos/tests/kmscon.nix index 0eb7e941bd84..28f2cdd1c3d3 100644 --- a/nixos/tests/kmscon.nix +++ b/nixos/tests/kmscon.nix @@ -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") ''; }