Skip to content

Commit 8f00318

Browse files
test verbose output
1 parent 2de2cd4 commit 8f00318

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,5 @@ repos:
4040
pass_filenames: false
4141
always_run: true
4242
stages: [pre-push]
43+
verbose: true
4344

scripts/test-quiet.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,24 @@ if [ $CTEST_EXIT -ne 0 ]; then
1212
exit 1
1313
fi
1414

15-
# Extract summary from ctest output
16-
echo "C++/CUDA tests:"
17-
echo "$CTEST_OUTPUT" | grep -E "(tests passed|Test #.*Passed)" | head -2 | sed 's/^/ /'
15+
# Extract summary from ctest output (output to stderr so pre-commit shows it)
16+
echo "C++/CUDA tests:" >&2
17+
echo "$CTEST_OUTPUT" | grep -E "(tests passed|Test #.*Passed)" | head -2 | sed 's/^/ /' >&2
1818

1919
# Run pytest with quiet flag
2020
PYTEST_OUTPUT=$(pixi run pytest --quiet 2>&1)
2121
PYTEST_EXIT=$?
2222

2323
if [ $PYTEST_EXIT -ne 0 ]; then
24-
echo ""
25-
echo "Python tests:"
26-
echo "$PYTEST_OUTPUT"
24+
echo "" >&2
25+
echo "Python tests:" >&2
26+
echo "$PYTEST_OUTPUT" >&2
2727
exit 1
2828
fi
2929

30-
# Extract summary from pytest output (quiet mode shows minimal output)
31-
echo "Python tests:"
32-
echo "$PYTEST_OUTPUT" | grep -E "(passed|failed)" | tail -1 | sed 's/^/ /'
30+
# Extract summary from pytest output (output to stderr so pre-commit shows it)
31+
echo "Python tests:" >&2
32+
echo "$PYTEST_OUTPUT" | grep -E "(passed|failed)" | tail -1 | sed 's/^/ /' >&2
3333

3434
exit 0
3535

0 commit comments

Comments
 (0)