improve liminix-rebuild test
* make it executable * improve robustness * do't hardcode services.default (why did it do this?)
This commit is contained in:
parent
76f11bcc93
commit
b60126775a
3 changed files with 9 additions and 7 deletions
|
@ -32,9 +32,5 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
rootfsType = "jffs2";
|
rootfsType = "jffs2";
|
||||||
services.default = lib.mkForce (target {
|
|
||||||
name = "default";
|
|
||||||
contents = with config.services; [ loopback ntp defaultroute4 sshd dhcpv4 ];
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
5
tests/min-copy-closure/test-liminix-rebuild.sh
Normal file → Executable file
5
tests/min-copy-closure/test-liminix-rebuild.sh
Normal file → Executable file
|
@ -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
|
# 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,
|
# liminix-rebuild calls nix-build so won't run inside a derivation,
|
||||||
# meaning you have to remember to run it manually when changing
|
# meaning you have to remember to run it manually when changing
|
||||||
# liminix-rebuild
|
# liminix-rebuild
|
||||||
|
|
||||||
# nix-shell -p expect socat --run "sh ./tests/min-copy-closure/test-liminix-rebuild.sh "
|
|
||||||
|
|
||||||
. tests/test-helpers.sh
|
. tests/test-helpers.sh
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
|
@ -5,4 +5,9 @@ send "\r\n"
|
||||||
expect {
|
expect {
|
||||||
"# " { send "hostname\r\n" };
|
"# " { send "hostname\r\n" };
|
||||||
}
|
}
|
||||||
expect "(none)"
|
|
||||||
|
expect {
|
||||||
|
"(none)" {}
|
||||||
|
"liminix" {}
|
||||||
|
timeout { exit(1) }
|
||||||
|
}
|
Loading…
Reference in a new issue