liminix

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit b60126775a2a06f227a5028c6d20832c89f03fb6
parent 76f11bcc93a9a865fd9fec393f0949cc013d77da
Author: Daniel Barlow <dan@telent.net>
Date:   Thu, 28 Mar 2024 21:27:35 +0000

improve liminix-rebuild test

* make it executable
* improve robustness
* do't hardcode services.default (why did it do this?)

Diffstat:
Mtests/min-copy-closure/configuration.nix | 4----
Mtests/min-copy-closure/test-liminix-rebuild.sh | 5+++--
Mtests/min-copy-closure/wait-until-ready.expect | 9+++++++--
3 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/tests/min-copy-closure/configuration.nix b/tests/min-copy-closure/configuration.nix @@ -32,9 +32,5 @@ in { }; rootfsType = "jffs2"; - services.default = lib.mkForce (target { - name = "default"; - contents = with config.services; [ loopback ntp defaultroute4 sshd dhcpv4 ]; - }); }; } diff --git a/tests/min-copy-closure/test-liminix-rebuild.sh b/tests/min-copy-closure/test-liminix-rebuild.sh @@ -1,10 +1,11 @@ +#!/usr/bin/env nix-shell +#! nix-shell -v -i bash -p expect socat + # This is a test for liminix-rebuild. It's not a CI test because # liminix-rebuild calls nix-build so won't run inside a derivation, # meaning you have to remember to run it manually when changing # liminix-rebuild -# nix-shell -p expect socat --run "sh ./tests/min-copy-closure/test-liminix-rebuild.sh " - . tests/test-helpers.sh set -e diff --git a/tests/min-copy-closure/wait-until-ready.expect b/tests/min-copy-closure/wait-until-ready.expect @@ -5,4 +5,9 @@ send "\r\n" expect { "# " { send "hostname\r\n" }; } -expect "(none)" -\ No newline at end of file + +expect { + "(none)" {} + "liminix" {} + timeout { exit(1) } +} +\ No newline at end of file