about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorJacob Moody <moody@posixcafe.org>2024-03-12 13:38:52 -0500
committerJacob Moody <moody@posixcafe.org>2024-03-19 20:18:57 -0500
commite4789ca32a9cfed76b6d2713cafae0f4c0023bef (patch)
tree391ec1c34edb7ff81a67e791feeb33094e2c4b18 /nixos
parent04e1a2d69c26f3d7f1d16551842a9ec3b16e3223 (diff)
drawterm: unstable-2024-02-18 -> unstable-2024-03-20
Diffstat (limited to 'nixos')
-rw-r--r--nixos/tests/drawterm.nix15
1 files changed, 14 insertions, 1 deletions
diff --git a/nixos/tests/drawterm.nix b/nixos/tests/drawterm.nix
index 1d444bb55433b..3594343853c01 100644
--- a/nixos/tests/drawterm.nix
+++ b/nixos/tests/drawterm.nix
@@ -38,11 +38,24 @@ let
         def drawterm_running():
             machine.succeed("pgrep drawterm")
 
+        # cage is a bit wonky here.
+        # it seems to lag behind drawing
+        # and somehow needs a single input character
+        # in order to get the first prompt to show up.
+        # This is not present in any other compositor
+        # as far as I know, and after spending a couple
+        # hours with the upstream source trying to deduce
+        # how to perhaps fix it, I figured just polling is OK.
+        @polling_condition
+        def cpu_shown_up():
+            machine.send_chars(".")
+            machine.wait_for_text("cpu", 1)
+
         start_all()
 
         machine.wait_for_unit("graphical.target")
         drawterm_running.wait() # type: ignore[union-attr]
-        machine.wait_for_text("cpu")
+        cpu_shown_up.wait() # type: ignore[union-attr]
         machine.send_chars("cpu\n")
         machine.wait_for_text("auth")
         machine.send_chars("cpu\n")