forked from lix-project/lix
Re-enable systemd-nspawn test
It was disabled inc6953d1ff6
because a recent Nixpkgs bump brought in a new systemd which changed how systemd-nspawn worked. As far as I can tell, the issue was caused by this upstream systemd commit:b71a0192c0
Bind-mounting the host's `/sys` and `/proc` into the container's `/run/host/{sys,proc}` fixes the issue and allows the test to succeed. (cherry picked from commit 883092e3f78d4efb1066a2e24e343b307035a04c)
This commit is contained in:
parent
40a014416b
commit
f3005632c4
|
@ -56,8 +56,8 @@
|
|||
host.fail("nix build -v --auto-allocate-uids --no-sandbox -L --offline --impure --file ${./id-test.nix} --argstr name id-test-6 --arg uidRange true")
|
||||
|
||||
# Run systemd-nspawn in a Nix build.
|
||||
#host.succeed("nix build -v --auto-allocate-uids --sandbox -L --offline --impure --file ${./systemd-nspawn.nix} --argstr nixpkgs ${nixpkgs}")
|
||||
#host.succeed("[[ $(cat ./result/msg) = 'Hello World' ]]")
|
||||
host.succeed("nix build -v --auto-allocate-uids --sandbox -L --offline --impure --file ${./systemd-nspawn.nix} --argstr nixpkgs ${nixpkgs}")
|
||||
host.succeed("[[ $(cat ./result/msg) = 'Hello World' ]]")
|
||||
'';
|
||||
|
||||
}
|
||||
|
|
|
@ -73,6 +73,8 @@ runCommand "test"
|
|||
--resolv-conf=off \
|
||||
--bind-ro=/nix/store \
|
||||
--bind=$out \
|
||||
--bind=/proc:/run/host/proc \
|
||||
--bind=/sys:/run/host/sys \
|
||||
--private-network \
|
||||
$toplevel/init
|
||||
''
|
||||
|
|
Loading…
Reference in a new issue