mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-21 05:00:16 +00:00
tests/shadow: Improve
On slow hardware, the test was flaky. This improves it.
This commit is contained in:
parent
9f371adb3d
commit
1d364e5138
|
@ -35,6 +35,7 @@ in import ./make-test-python.nix ({ pkgs, ... }: {
|
|||
shadow.send_chars("emma\n")
|
||||
shadow.wait_until_tty_matches(2, "login: emma")
|
||||
shadow.wait_until_succeeds("pgrep login")
|
||||
shadow.sleep(2)
|
||||
shadow.send_chars("${password1}\n")
|
||||
shadow.send_chars("whoami > /tmp/1\n")
|
||||
shadow.wait_for_file("/tmp/1")
|
||||
|
@ -49,6 +50,7 @@ in import ./make-test-python.nix ({ pkgs, ... }: {
|
|||
shadow.send_chars("emma\n")
|
||||
shadow.wait_until_tty_matches(3, "login: emma")
|
||||
shadow.wait_until_succeeds("pgrep login")
|
||||
shadow.sleep(2)
|
||||
shadow.send_chars("${password1}\n")
|
||||
shadow.send_chars("passwd\n")
|
||||
shadow.sleep(2)
|
||||
|
@ -66,12 +68,14 @@ in import ./make-test-python.nix ({ pkgs, ... }: {
|
|||
shadow.send_chars("emma\n")
|
||||
shadow.wait_until_tty_matches(4, "login: emma")
|
||||
shadow.wait_until_succeeds("pgrep login")
|
||||
shadow.sleep(2)
|
||||
shadow.send_chars("${password1}\n")
|
||||
shadow.wait_until_tty_matches(4, "Login incorrect")
|
||||
shadow.wait_until_tty_matches(4, "login:")
|
||||
shadow.send_chars("emma\n")
|
||||
shadow.wait_until_tty_matches(4, "login: emma")
|
||||
shadow.wait_until_succeeds("pgrep login")
|
||||
shadow.sleep(2)
|
||||
shadow.send_chars("${password3}\n")
|
||||
shadow.send_chars("whoami > /tmp/2\n")
|
||||
shadow.wait_for_file("/tmp/2")
|
||||
|
|
Loading…
Reference in a new issue