liminix/tests/jffs2/test.nix

22 lines
524 B
Nix
Raw Normal View History

2023-04-06 21:58:26 +02:00
{
liminix
, nixpkgs
}:
let img = (import liminix {
device = import "${liminix}/devices/qemu/";
liminix-config = ./configuration.nix;
}).outputs.vmroot;
2023-04-06 21:58:26 +02:00
pkgs = import <nixpkgs> { overlays = [(import ../../overlay.nix)]; };
2023-09-20 19:33:08 +02:00
inherit (pkgs.pkgsBuildBuild) routeros run-liminix-vm;
2023-04-06 21:58:26 +02:00
in pkgs.runCommand "check" {
nativeBuildInputs = with pkgs; [
2023-09-20 19:33:08 +02:00
run-liminix-vm
2023-04-06 21:58:26 +02:00
expect
socat
] ;
} ''
mkdir vm
2023-09-20 19:33:08 +02:00
run-liminix-vm --background ./vm ${img}/vmlinux ${img}/rootfs
2023-04-06 21:58:26 +02:00
expect ${./script.expect} >$out
''