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"
|
||||
echo "Chunk $myChunk on $system start"
|
||||
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" \
|
||||
--eval-system "$system" \
|
||||
--option restrict-eval true \
|
||||
|
@ -103,13 +104,19 @@ let
|
|||
--arg includeBroken ${lib.boolToString includeBroken} \
|
||||
-I ${nixpkgs} \
|
||||
-I ${attrpathFile} \
|
||||
> "$outputDir/result/$myChunk"
|
||||
> "$outputDir/result/$myChunk" \
|
||||
2> "$outputDir/stderr/$myChunk"
|
||||
exitCode=$?
|
||||
set -e
|
||||
cat "$outputDir/stderr/$myChunk"
|
||||
cat "$outputDir/timestats/$myChunk"
|
||||
if (( exitCode != 0 )); then
|
||||
echo "Evaluation failed with exit code $exitCode"
|
||||
# This immediately halts all xargs processes
|
||||
kill $PPID
|
||||
elif [[ -s "$outputDir/stderr/$myChunk" ]]; then
|
||||
echo "Nixpkgs on $system evaluated with warnings, aborting"
|
||||
kill $PPID
|
||||
fi
|
||||
'';
|
||||
in
|
||||
|
@ -165,7 +172,7 @@ let
|
|||
''}
|
||||
|
||||
chunkOutputDir=$(mktemp -d)
|
||||
mkdir "$chunkOutputDir"/{result,stats}
|
||||
mkdir "$chunkOutputDir"/{result,stats,timestats,stderr}
|
||||
|
||||
seq -w 0 "$seq_end" |
|
||||
command time -f "%e" -o "$out/total-time" \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue