Skip to content
This repository has been archived by the owner on Oct 2, 2024. It is now read-only.

reprint warnings before exit (ch-run, ch-image) #1677

Merged
merged 26 commits into from
Sep 6, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bin/ch_misc.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

/* Size of “warnings” buffer, in bytes. We want this to be big enough that we
don’t need to worry about running out of room. */
#define WARNINGS_SIZE (3*1024)
#define WARNINGS_SIZE (4*1024)

/* Test some value, and if it's not what we expect, exit with a fatal error.
These are macros so we have access to the file and line number.
Expand Down
6 changes: 3 additions & 3 deletions test/run/ch-run_misc.bats
Original file line number Diff line number Diff line change
Expand Up @@ -1074,8 +1074,8 @@ EOF
run ch-run --warnings=100
echo "$output"
[[ $status -eq 0 ]]
[[ $output == *'ch-run['*']: warning: reprinting first 52 warning(s)'* ]]
[[ $(echo "$output" | grep -Fc 'this is warning 52!') -eq 2 ]]
[[ $(echo "$output" | grep -Fc 'this is warning 53!') -eq 1 ]]
[[ $output == *'ch-run['*']: warning: reprinting first '*' warning(s)'* ]]
[[ $(echo "$output" | grep -Fc 'this is warning 1!') -eq 2 ]]
[[ $(echo "$output" | grep -Fc 'this is warning 100!') -eq 1 ]]
Comment on lines +1077 to +1079
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clever!


}