fix(nix/runTestsuite): use s6-portable-utils

Same as 221698c603dcb318c609b4d21cb2a9fada44a14c

We had a bunch of instances of
https://github.com/NixOS/nix/issues/2176,
where nix would exit with a “killed by signal 9” error.

According to Eelco in that issue, this is perfectly normal behaviour
of course, and appears if the last command in a loop closes `stdout`
or `stdin`, then the builder will SIGKILL it immediately. This is of
course also a perfectly fine error message for that case.

It turns out that mainly GNU coreutils exhibit this behaviour …

Let’s see if using a more sane tool suite fixes that.

Change-Id: Iaf9e542952ca36c02208a3f067f575ba978272b4
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2663
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
This commit is contained in:
Profpatsch 2021-03-26 11:40:26 +01:00
parent 4a33ce1dc1
commit d0b635f6f2

View file

@ -37,7 +37,8 @@ let
bool
;
bins = depot.nix.getBins pkgs.coreutils [ "printf" "touch" ];
bins = depot.nix.getBins pkgs.coreutils [ "printf" ]
// depot.nix.getBins pkgs.s6-portable-utils [ "s6-touch" ];
# Returns true if the given expression throws when `deepSeq`-ed
throws = expr:
@ -161,7 +162,7 @@ let
then depot.nix.runExecline.local "testsuite-${name}-successful" {} [
"importas" "out" "out"
"if" [ bins.printf "%s\n" "testsuite ${name} successful!" ]
bins.touch "$out"
bins.s6-touch "$out"
]
else depot.nix.runExecline.local "testsuite-${name}-failed" {} [
"importas" "out" "out"