diff options
author | Artturi <Artturin@artturin.com> | 2023-01-19 13:12:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-19 13:12:18 +0200 |
commit | 3653f4ece2a1afa4c81d0c95cc5bc5654f629859 (patch) | |
tree | b5d54afec93fe2f1f96c9f4421232325e4b2b47b /pkgs/build-support | |
parent | 8a230e96946910f4ba60d5cb3bcb9d6079c47d8b (diff) | |
parent | 3f3ca2d90dba5431f9e573ec04c005c233a8887f (diff) |
Merge pull request #211260 from Artturin/testtweaks1
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/testers/expect-failure.sh | 9 | ||||
-rw-r--r-- | pkgs/build-support/testers/test/default.nix | 3 |
2 files changed, 11 insertions, 1 deletions
diff --git a/pkgs/build-support/testers/expect-failure.sh b/pkgs/build-support/testers/expect-failure.sh index 052ee85271766..9c725d48bf342 100644 --- a/pkgs/build-support/testers/expect-failure.sh +++ b/pkgs/build-support/testers/expect-failure.sh @@ -34,6 +34,15 @@ echo "testBuildFailure: Original builder produced exit code: $r" # ----------------------------------------- # Write the build log to the default output +# +# # from stdenv setup.sh +getAllOutputNames() { + if [ -n "$__structuredAttrs" ]; then + echo "${!outputs[*]}" + else + echo "$outputs" + fi +} outs=( $(getAllOutputNames) ) defOut=${outs[0]} diff --git a/pkgs/build-support/testers/test/default.nix b/pkgs/build-support/testers/test/default.nix index 26e622c8763fb..0a5381b2b738d 100644 --- a/pkgs/build-support/testers/test/default.nix +++ b/pkgs/build-support/testers/test/default.nix @@ -58,9 +58,10 @@ lib.recurseIntoAttrs { inherit hello; } '' echo "Checking $failed/testBuildFailure.log" - grep -F 'testBuildFailure: The builder did not fail, but a failure was expected' $failed/testBuildFailure.log + grep -F 'testBuildFailure: The builder did not fail, but a failure was expected' $failed/testBuildFailure.log >/dev/null [[ 1 = $(cat $failed/testBuildFailure.exit) ]] touch $out + echo 'All good.' ''; multiOutput = runCommand "testBuildFailure-multiOutput" { |