diff options
author | fanquake <fanquake@gmail.com> | 2024-03-19 14:42:04 +0000 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2024-03-19 14:50:39 +0000 |
commit | 8e95a9cd7ad6c448ed91f1c30e582c31e96c9df3 (patch) | |
tree | ac2462c4ed0438f0b163162acdd59e2b60c71e4a /ci | |
parent | 9f2609de09eb6299548e4c56b0f325361c5ad781 (diff) | |
parent | fae70ba00da27ca5734c88e9964c872c7faa0f78 (diff) | |
download | bitcoin-8e95a9cd7ad6c448ed91f1c30e582c31e96c9df3.tar.xz |
Merge bitcoin/bitcoin#29094: ci: Better tidy errors
fae70ba00da27ca5734c88e9964c872c7faa0f78 ci: Better tidy errors (MarcoFalke)
Pull request description:
Currently tidy errors are not nice, because the user may have to scroll up to see them in a large block of text. See for example (before) https://github.com/bitcoin/bitcoin/runs/19670551485
Fix that by `tee`ing the output to a file and summarizing the errors in the end again. See for example (after): https://github.com/bitcoin/bitcoin/runs/22647850662
ACKs for top commit:
hebasto:
ACK fae70ba00da27ca5734c88e9964c872c7faa0f78, logs with errors look cleaner.
TheCharlatan:
ACK fae70ba00da27ca5734c88e9964c872c7faa0f78
Tree-SHA512: dcaea557fed40089409d16ce2cbaa8a9cfbf047f601d5daadfee0823b0eed7badc12d803addc0b7b6bb3f1eaf5c787fccb2488475d32c4efd80835f386f761dd
Diffstat (limited to 'ci')
-rwxr-xr-x | ci/test/03_test_script.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ci/test/03_test_script.sh b/ci/test/03_test_script.sh index 786cb08bf6..d85e24a5c0 100755 --- a/ci/test/03_test_script.sh +++ b/ci/test/03_test_script.sh @@ -182,7 +182,11 @@ if [ "${RUN_TIDY}" = "true" ]; then set -eo pipefail cd "${BASE_BUILD_DIR}/bitcoin-$HOST/src/" - ( run-clang-tidy-"${TIDY_LLVM_V}" -quiet -load="/tidy-build/libbitcoin-tidy.so" "${MAKEJOBS}" ) | grep -C5 "error" + if ! ( run-clang-tidy-"${TIDY_LLVM_V}" -quiet -load="/tidy-build/libbitcoin-tidy.so" "${MAKEJOBS}" | tee tmp.tidy-out.txt ); then + grep -C5 "error: " tmp.tidy-out.txt + echo "^^^ ⚠️ Failure generated from clang-tidy" + false + fi # Filter out files by regex here, because regex may not be # accepted in src/.bear-tidy-config # Filter out: |