summary refs log tree commit diff
path: root/nixos/tests
diff options
context:
space:
mode:
authorWeijia Wang <9713184+wegank@users.noreply.github.com>2023-10-28 19:59:01 +0200
committerFrancesco Gazzetta <fgaz@fgaz.me>2023-11-07 19:33:16 +0000
commit1dab6eb2eaadb7ea5c335fe18aa7d35b1d72e472 (patch)
tree69dd4417ec296961ca10af0cf81aecfcfacddc63 /nixos/tests
parentf7177e24aafd49841faa0713a591e27b7a902831 (diff)
downloadnixpkgs-1dab6eb2eaadb7ea5c335fe18aa7d35b1d72e472.tar
nixpkgs-1dab6eb2eaadb7ea5c335fe18aa7d35b1d72e472.tar.gz
nixpkgs-1dab6eb2eaadb7ea5c335fe18aa7d35b1d72e472.tar.bz2
nixpkgs-1dab6eb2eaadb7ea5c335fe18aa7d35b1d72e472.tar.lz
nixpkgs-1dab6eb2eaadb7ea5c335fe18aa7d35b1d72e472.tar.xz
nixpkgs-1dab6eb2eaadb7ea5c335fe18aa7d35b1d72e472.tar.zst
nixpkgs-1dab6eb2eaadb7ea5c335fe18aa7d35b1d72e472.zip
nixosTests.shattered-pixel-dungeon: use wait_for_text
Diffstat (limited to 'nixos/tests')
-rw-r--r--nixos/tests/shattered-pixel-dungeon.nix4
1 files changed, 1 insertions, 3 deletions
diff --git a/nixos/tests/shattered-pixel-dungeon.nix b/nixos/tests/shattered-pixel-dungeon.nix
index a256bbdfd73..b4ac1670b5c 100644
--- a/nixos/tests/shattered-pixel-dungeon.nix
+++ b/nixos/tests/shattered-pixel-dungeon.nix
@@ -21,9 +21,7 @@ import ./make-test-python.nix ({ pkgs, ... }: {
       machine.wait_for_x()
       machine.execute("shattered-pixel-dungeon >&2 &")
       machine.wait_for_window(r"Shattered Pixel Dungeon")
-      machine.sleep(5)
-      if "Enter" not in machine.get_screen_text():
-          raise Exception("Program did not start successfully")
+      machine.wait_for_text("Enter")
       machine.screenshot("screen")
     '';
 })