Skip to content

Commit dd92911

Browse files
committed
Merge bitcoin/bitcoin#31148: ci: display logs of failed unit tests automatically
8523d8c ci: display logs of failed tests automatically (furszy) Pull request description: Saw it here https://github.com/bitcoin/bitcoin/actions/runs/11488618084/job/31975712362?pr=31000. The 'test-each-commit' and 'win64' CI jobs currently do not display test logs when an error occurs, making it almost impossible to debug issues that don't arise locally. Fix this by setting the CTest `--output-on-failure` flag (per [README](https://github.com/bitcoin/bitcoin/blob/2f40e453ccdf5f75b599fc7168abd512510686c5/src/test/README.md?plain=1#L130)). ACKs for top commit: hebasto: ACK 8523d8c, I have reviewed the code and it looks OK. Tree-SHA512: 59c025099fb623e2ed430cfc1ba808e1d3ff72773d021e2280a44423ae53615c16e96a07014eb8581c95aae241b6d2777e388a8931ff0904feb84ca45cb22763
2 parents 0c79c34 + 8523d8c commit dd92911

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
run: |
7373
# Run tests on commits after the last merge commit and before the PR head commit
7474
# Use clang++, because it is a bit faster and uses less memory than g++
75-
git rebase --exec "echo Running test-one-commit on \$( git log -1 ) && CC=clang CXX=clang++ cmake -B build -DWERROR=ON -DWITH_ZMQ=ON -DBUILD_GUI=ON -DBUILD_BENCH=ON -DBUILD_FUZZ_BINARY=ON -DWITH_BDB=ON -DWITH_MINIUPNPC=ON -DWITH_USDT=ON && cmake --build build -j $(nproc) && ctest --test-dir build -j $(nproc) && ./build/test/functional/test_runner.py -j $(( $(nproc) * 2 ))" ${{ env.TEST_BASE }}
75+
git rebase --exec "echo Running test-one-commit on \$( git log -1 ) && CC=clang CXX=clang++ cmake -B build -DWERROR=ON -DWITH_ZMQ=ON -DBUILD_GUI=ON -DBUILD_BENCH=ON -DBUILD_FUZZ_BINARY=ON -DWITH_BDB=ON -DWITH_MINIUPNPC=ON -DWITH_USDT=ON && cmake --build build -j $(nproc) && ctest --output-on-failure --test-dir build -j $(nproc) && ./build/test/functional/test_runner.py -j $(( $(nproc) * 2 ))" ${{ env.TEST_BASE }}
7676
7777
macos-native-arm64:
7878
name: 'macOS 14 native, arm64, no depends, sqlite only, gui'
@@ -199,7 +199,7 @@ jobs:
199199
- name: Run test suite
200200
working-directory: build
201201
run: |
202-
ctest -j $env:NUMBER_OF_PROCESSORS -C Release
202+
ctest --output-on-failure -j $env:NUMBER_OF_PROCESSORS -C Release
203203
204204
- name: Run functional tests
205205
working-directory: build

0 commit comments

Comments
 (0)