liminix-fork/tests/wlan/test.nix
Daniel Barlow 94e51db649 tests: use run.sh instead of calling run-liminix-vm directly
this makes it easier to run tests on aarch64 where
qemu wants an Image file instead of a vmlinux
2023-09-24 00:24:48 +01:00

21 lines
520 B
Nix

{
liminix
, nixpkgs
}:
let img = (import liminix {
device = import "${liminix}/devices/qemu/";
liminix-config = ./configuration.nix;
}).outputs.default;
pkgs = import <nixpkgs> { overlays = [(import ../../overlay.nix)]; };
inherit (pkgs.pkgsBuildBuild) run-liminix-vm;
in pkgs.runCommand "check" {
nativeBuildInputs = with pkgs; [
expect socat
] ;
} ''
. ${../test-helpers.sh}
mkdir vm
${img}/run.sh --background ./vm
expect ${./wait-for-wlan.expect} |tee output && mv output $out
''