Skip to content

Commit 07e31f2

Browse files
committed
Include output of failing TAP tests into regression diff section
1 parent 712cf0a commit 07e31f2

3 files changed

Lines changed: 44 additions & 0 deletions

File tree

.github/workflows/linux-32bit-build-and-test.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,21 @@ jobs:
230230
run: |
231231
find . -name regression.diffs -exec cat {} + > regression.log
232232
233+
# TAP tests do not produce regression.diffs. Append prove's failure
234+
# summary from installcheck.log plus, for each failing test, the failed
235+
# assertions
236+
sed -n '/^Test Summary Report/,/^Result:/p' installcheck.log >> regression.log 2>/dev/null || true
237+
for t in $(grep -hoE 't/[^ ]+\.pl[[:space:]]+\(Wstat' installcheck.log 2>/dev/null | sed -E 's#t/(.+)\.pl.*#\1#'); do
238+
echo "=== regress_log_$t ===" >> regression.log
239+
find . -name "regress_log_$t" -exec awk '
240+
FNR==1 { blk=0 }
241+
{ sub(/^\[[0-9:.]+\]\([0-9.]+s\) /, "") }
242+
/^ok |^not ok |^# Looks like|^# Running:|^1\.\.|^Bail out/ { blk=0 }
243+
/^# Failed test/ { blk=1 }
244+
blk { print }
245+
' {} + >> regression.log || true
246+
done
247+
233248
if [[ -s regression.log ]]; then echo "regression_diff=true" >>$GITHUB_OUTPUT; fi
234249
grep -e 'FAILED' -e 'failed (ignored)' -e 'not ok' installcheck.log || true
235250
cat regression.log

.github/workflows/linux-build-and-test.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,21 @@ jobs:
267267
run: |
268268
find . -name regression.diffs -exec cat {} + > regression.log
269269
270+
# TAP tests do not produce regression.diffs. Append prove's failure
271+
# summary from installcheck.log plus, for each failing test, the failed
272+
# assertions
273+
sed -n '/^Test Summary Report/,/^Result:/p' installcheck.log >> regression.log 2>/dev/null || true
274+
for t in $(grep -hoE 't/[^ ]+\.pl[[:space:]]+\(Wstat' installcheck.log 2>/dev/null | sed -E 's#t/(.+)\.pl.*#\1#'); do
275+
echo "=== regress_log_$t ===" >> regression.log
276+
find . -name "regress_log_$t" -exec awk '
277+
FNR==1 { blk=0 }
278+
{ sub(/^\[[0-9:.]+\]\([0-9.]+s\) /, "") }
279+
/^ok |^not ok |^# Looks like|^# Running:|^1\.\.|^Bail out/ { blk=0 }
280+
/^# Failed test/ { blk=1 }
281+
blk { print }
282+
' {} + >> regression.log || true
283+
done
284+
270285
if [[ "${{ runner.os }}" == "Linux" ]] ; then
271286
# wait in case there are in-progress coredumps
272287
sleep 10

.github/workflows/sanitizer-build-and-test.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,20 @@ jobs:
174174
id: collectlogs
175175
run: |
176176
find . -name regression.diffs -exec cat {} + > regression.log
177+
# TAP tests do not produce regression.diffs. Append prove's failure
178+
# summary from installcheck.log plus, for each failing test, the failed
179+
# assertions
180+
sed -n '/^Test Summary Report/,/^Result:/p' installcheck.log >> regression.log 2>/dev/null || true
181+
for t in $(grep -hoE 't/[^ ]+\.pl[[:space:]]+\(Wstat' installcheck.log 2>/dev/null | sed -E 's#t/(.+)\.pl.*#\1#'); do
182+
echo "=== regress_log_$t ===" >> regression.log
183+
find . -name "regress_log_$t" -exec awk '
184+
FNR==1 { blk=0 }
185+
{ sub(/^\[[0-9:.]+\]\([0-9.]+s\) /, "") }
186+
/^ok |^not ok |^# Looks like|^# Running:|^1\.\.|^Bail out/ { blk=0 }
187+
/^# Failed test/ { blk=1 }
188+
blk { print }
189+
' {} + >> regression.log || true
190+
done
177191
if [[ "${{ runner.os }}" == "Linux" ]] ; then
178192
# wait in case there are in-progress coredumps
179193
sleep 10

0 commit comments

Comments
 (0)