diff --git a/modules/outputs.nix b/modules/outputs.nix index bab2c73..3232d80 100644 --- a/modules/outputs.nix +++ b/modules/outputs.nix @@ -99,7 +99,7 @@ in echo ${cmdline} > commandline cat > run.sh << EOF #!${pkgs.runtimeShell} - CMDLINE=${cmdline} run-liminix-vm --arch ${arch} ${makeBootableImage} ${config.system.outputs.rootfs} + CMDLINE=${cmdline} ${pkgs.pkgsBuildBuild.run-liminix-vm}/bin/run-liminix-vm --arch ${arch} \$* ${makeBootableImage} ${config.system.outputs.rootfs} EOF chmod +x run.sh ''; diff --git a/tests/jffs2/test.nix b/tests/jffs2/test.nix index 44ad570..f972583 100644 --- a/tests/jffs2/test.nix +++ b/tests/jffs2/test.nix @@ -7,15 +7,13 @@ let img = (import liminix { liminix-config = ./configuration.nix; }).outputs.vmroot; pkgs = import { overlays = [(import ../../overlay.nix)]; }; - inherit (pkgs.pkgsBuildBuild) routeros run-liminix-vm; in pkgs.runCommand "check" { nativeBuildInputs = with pkgs; [ - run-liminix-vm expect socat ] ; } '' mkdir vm -run-liminix-vm --background ./vm ${img}/vmlinux ${img}/rootfs +${img}/run.sh --background ./vm expect ${./script.expect} >$out '' diff --git a/tests/pppoe/test.nix b/tests/pppoe/test.nix index d0d1754..b9324fe 100644 --- a/tests/pppoe/test.nix +++ b/tests/pppoe/test.nix @@ -15,7 +15,6 @@ in pkgs.runCommand "check" { jq socat routeros.routeros - run-liminix-vm ] ; } '' serverstatedir=$(mktemp -d -t routeros-XXXXXX) @@ -27,7 +26,7 @@ export MPLCONFIGDIR=$(mktemp -d -t routeros-XXXXXX) routeros $serverstatedir mkdir vm -run-liminix-vm --background ./vm ${img}/vmlinux ${img}/rootfs +${img}/run.sh --background ./vm expect ${./getaddress.expect} set -o pipefail diff --git a/tests/wlan/test.nix b/tests/wlan/test.nix index 3dd9989..0251570 100644 --- a/tests/wlan/test.nix +++ b/tests/wlan/test.nix @@ -10,14 +10,12 @@ let img = (import liminix { inherit (pkgs.pkgsBuildBuild) run-liminix-vm; in pkgs.runCommand "check" { nativeBuildInputs = with pkgs; [ - expect - run-liminix-vm - socat + expect socat ] ; } '' . ${../test-helpers.sh} mkdir vm -run-liminix-vm --background ./vm ${img}/vmlinux ${img}/rootfs +${img}/run.sh --background ./vm expect ${./wait-for-wlan.expect} |tee output && mv output $out ''