mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-12 20:55:31 +03:00
ci/eval: fail on non-empty stderr (#381266)
This commit is contained in:
commit
1b2949a572
1 changed files with 10 additions and 3 deletions
|
@ -87,7 +87,8 @@ let
|
||||||
export NIX_SHOW_STATS_PATH="$outputDir/stats/$myChunk"
|
export NIX_SHOW_STATS_PATH="$outputDir/stats/$myChunk"
|
||||||
echo "Chunk $myChunk on $system start"
|
echo "Chunk $myChunk on $system start"
|
||||||
set +e
|
set +e
|
||||||
command time -f "Chunk $myChunk on $system done [%MKB max resident, %Es elapsed] %C" \
|
command time -o "$outputDir/timestats/$myChunk" \
|
||||||
|
-f "Chunk $myChunk on $system done [%MKB max resident, %Es elapsed] %C" \
|
||||||
nix-env -f "${nixpkgs}/pkgs/top-level/release-attrpaths-parallel.nix" \
|
nix-env -f "${nixpkgs}/pkgs/top-level/release-attrpaths-parallel.nix" \
|
||||||
--eval-system "$system" \
|
--eval-system "$system" \
|
||||||
--option restrict-eval true \
|
--option restrict-eval true \
|
||||||
|
@ -103,13 +104,19 @@ let
|
||||||
--arg includeBroken ${lib.boolToString includeBroken} \
|
--arg includeBroken ${lib.boolToString includeBroken} \
|
||||||
-I ${nixpkgs} \
|
-I ${nixpkgs} \
|
||||||
-I ${attrpathFile} \
|
-I ${attrpathFile} \
|
||||||
> "$outputDir/result/$myChunk"
|
> "$outputDir/result/$myChunk" \
|
||||||
|
2> "$outputDir/stderr/$myChunk"
|
||||||
exitCode=$?
|
exitCode=$?
|
||||||
set -e
|
set -e
|
||||||
|
cat "$outputDir/stderr/$myChunk"
|
||||||
|
cat "$outputDir/timestats/$myChunk"
|
||||||
if (( exitCode != 0 )); then
|
if (( exitCode != 0 )); then
|
||||||
echo "Evaluation failed with exit code $exitCode"
|
echo "Evaluation failed with exit code $exitCode"
|
||||||
# This immediately halts all xargs processes
|
# This immediately halts all xargs processes
|
||||||
kill $PPID
|
kill $PPID
|
||||||
|
elif [[ -s "$outputDir/stderr/$myChunk" ]]; then
|
||||||
|
echo "Nixpkgs on $system evaluated with warnings, aborting"
|
||||||
|
kill $PPID
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
|
@ -165,7 +172,7 @@ let
|
||||||
''}
|
''}
|
||||||
|
|
||||||
chunkOutputDir=$(mktemp -d)
|
chunkOutputDir=$(mktemp -d)
|
||||||
mkdir "$chunkOutputDir"/{result,stats}
|
mkdir "$chunkOutputDir"/{result,stats,timestats,stderr}
|
||||||
|
|
||||||
seq -w 0 "$seq_end" |
|
seq -w 0 "$seq_end" |
|
||||||
command time -f "%e" -o "$out/total-time" \
|
command time -f "%e" -o "$out/total-time" \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue