Skip to content

Commit

Permalink
[nix]: speed up rtl-event format check
Browse files Browse the repository at this point in the history
Signed-off-by: Avimitin <[email protected]>
  • Loading branch information
Avimitin committed Jul 15, 2024
1 parent a2e1524 commit f91ff82
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions tests/make-emu-result.nix
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,13 @@ let
exit 1
fi
lineNum=1
while IFS= read -r rawJson; do
if ! echo "$rawJson" | jq -e . >/dev/null 2>&1; then
echo -e "[nix] \033[0;31mInternal Error\033[0m: invalid JSON on line $lineNum in file rtl-event.jsonl, showing original file:"
echo "--------------------------------------------"
cat $out/rtl-event.jsonl
echo "--------------------------------------------"
exit 1
fi
lineNum=$((lineNum + 1))
done < "$out/rtl-event.jsonl"
if ! jq --stream -c -e '.[]' "$out/rtl-event.jsonl" >/dev/null 2>&1; then
echo -e "[nix] \033[0;31mInternal Error\033[0m: invalid JSON file rtl-event.jsonl, showing original file:"
echo "--------------------------------------------"
cat $out/rtl-event.jsonl
echo "--------------------------------------------"
exit 1
fi
runHook postCheck
'';
Expand Down

0 comments on commit f91ff82

Please sign in to comment.