2023-05-07 23:02:10 +02:00
|
|
|
{
|
|
|
|
liminix
|
|
|
|
, nixpkgs
|
|
|
|
}:
|
|
|
|
let lmx = (import liminix {
|
|
|
|
device = import "${liminix}/devices/qemu/";
|
|
|
|
liminix-config = ./configuration.nix;
|
|
|
|
});
|
|
|
|
rogue = lmx.pkgs.rogue;
|
|
|
|
img = lmx.outputs.vmroot;
|
|
|
|
pkgs = import <nixpkgs> { overlays = [(import ../../overlay.nix)]; };
|
|
|
|
in pkgs.runCommand "check" {
|
|
|
|
nativeBuildInputs = with pkgs; [
|
|
|
|
expect
|
|
|
|
socat
|
|
|
|
min-copy-closure
|
|
|
|
rogue
|
|
|
|
] ;
|
|
|
|
} ''
|
2023-05-08 00:01:24 +02:00
|
|
|
. ${../test-helpers.sh}
|
2023-05-07 23:02:10 +02:00
|
|
|
|
2023-12-24 00:12:40 +01:00
|
|
|
(
|
2023-05-07 23:02:10 +02:00
|
|
|
mkdir vm
|
2023-12-09 18:35:21 +01:00
|
|
|
${img}/run.sh --lan user,hostfwd=tcp::2022-:22 --background ./vm
|
2023-05-07 23:02:10 +02:00
|
|
|
expect ${./wait-until-ready.expect}
|
|
|
|
export SSH_COMMAND="ssh -o StrictHostKeyChecking=no -p 2022 -i ${./id}"
|
|
|
|
$SSH_COMMAND root@localhost echo ready
|
2023-12-24 00:12:40 +01:00
|
|
|
IN_NIX_BUILD=true min-copy-closure --quiet root@localhost ${rogue}
|
|
|
|
$SSH_COMMAND root@localhost ls -ld ${rogue}
|
|
|
|
IN_NIX_BUILD=true min-copy-closure --root /run root@localhost ${rogue}
|
|
|
|
$SSH_COMMAND root@localhost ls -ld /run/${rogue}
|
|
|
|
) 2>&1 | tee $out
|
2023-05-07 23:02:10 +02:00
|
|
|
''
|