From 5f9ffa804fd9b109d0312b005170b1696a771b69 Mon Sep 17 00:00:00 2001 From: Daniel Barlow Date: Fri, 22 Dec 2023 15:29:33 +0000 Subject: [PATCH] better detect test succeeded --- tests/tftpboot/configuration.nix | 2 ++ tests/tftpboot/script.expect | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/tftpboot/configuration.nix b/tests/tftpboot/configuration.nix index f57577d..9196037 100644 --- a/tests/tftpboot/configuration.nix +++ b/tests/tftpboot/configuration.nix @@ -17,7 +17,9 @@ in { ../../modules/outputs/ext4fs.nix ../../modules/outputs/tftpboot.nix ]; + config = { + hostname = "tftpboot-test"; # use extracted dts if it was null in the device # definition, use actual dts if provided hardware.dts.src = lib.mkOverride 500 dts; diff --git a/tests/tftpboot/script.expect b/tests/tftpboot/script.expect index a622e15..63d54e2 100644 --- a/tests/tftpboot/script.expect +++ b/tests/tftpboot/script.expect @@ -20,11 +20,11 @@ expect { } expect { - "#" { send "test -f /proc/device-tree/reserved-memory/phram-rootfs*/name && tty \r" } + "#" { send "test -f /proc/device-tree/reserved-memory/phram-rootfs*/name && hostname \r" } timeout { exit 1 } } expect { - "/dev/ttyS0" { exit 0 } + "tftpboot-test" { exit 0 } timeout { exit 1 } } \ No newline at end of file