forked from dan/liminix
1
0
Fork 0
liminix/tests/wlan/test.nix

24 lines
573 B
Nix
Raw Normal View History

2023-02-08 23:19:18 +00:00
{
liminix
, nixpkgs
}:
let img = (import liminix {
device = import "${liminix}/devices/qemu/";
liminix-config = ./configuration.nix;
}).outputs.default;
pkgs = import <nixpkgs> { overlays = [(import ../../overlay.nix)]; };
2023-09-20 17:33:08 +00:00
inherit (pkgs.pkgsBuildBuild) run-liminix-vm;
2023-02-08 23:19:18 +00:00
in pkgs.runCommand "check" {
nativeBuildInputs = with pkgs; [
expect
2023-09-20 17:33:08 +00:00
run-liminix-vm
2023-02-08 23:19:18 +00:00
socat
] ;
} ''
2023-05-07 22:01:24 +00:00
. ${../test-helpers.sh}
2023-02-08 23:19:18 +00:00
mkdir vm
2023-09-20 17:33:08 +00:00
run-liminix-vm --background ./vm ${img}/vmlinux ${img}/rootfs
expect ${./wait-for-wlan.expect} |tee output && mv output $out
2023-02-08 23:19:18 +00:00
''