Skip to content

scripts: handle diff errors in diffcheck.sh - #2391

Open
wangjinglab wants to merge 1 commit into
bitcoin:masterfrom
wangjinglab:master
Open

wangjinglab wants to merge 1 commit into
bitcoin:masterfrom
wangjinglab:master

Conversation

@wangjinglab

Copy link
Copy Markdown

scripts/diffcheck.sh filters the output of both diff commands without checking their exit statuses. If scripts/diffcheck.expected is missing, the script prints a success message and exits with status 0.

A missing README.mediawiki can also pass when the expected delta is empty.

Testing

  • Ran scripts/diffcheck.sh from the repository root.
  • Verified that a matching table exits 0 and an unexpected table difference prints the changed lines and exits 1.
  • Verified in a temporary checkout that removing either README.mediawiki or scripts/diffcheck.expected causes the script to exit 2 without printing the success message.

Signed-off-by: wangjinglab <wangjinglab@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant