Skip to content

Commit d025f24

Browse files
committed
checks_run: ensure we report coverage on recheck
problem: checks_run only reports coverage if the initial check succeeds, but reports success if recheck succeeds. That hides errors in the coverage reporting and means we don't get some of our test coverage whenever a spurious test failure happens during coverage solution: move coverage reporting into a new POSTCHECKCMDS variable that we evaluate if check succeeds or if recheck succeeds
1 parent 81394d5 commit d025f24

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/test/checks_run.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ if test "$PROJECT" = "flux-core"; then
9595
&& echo '#error Non-build-tree flux/core.h!' > /usr/include/flux/core.h"
9696
fi
9797

98+
POSTCHECKCMDS=":"
9899
# Enable coverage for $CC-coverage build
99100
# We can't use distcheck here, it doesn't play well with coverage testing:
100101
if test "$COVERAGE" = "t"; then
@@ -138,11 +139,13 @@ if test "$COVERAGE" = "t"; then
138139
SYSTEM_TESTS=$(cd t && grep -l ci=system *.t)
139140

140141
ARGS="$ARGS --enable-code-coverage"
142+
141143
CHECKCMDS="\
142144
export ENABLE_USER_SITE=1 && \
143145
export COVERAGE_PROCESS_START=$(pwd)/coverage.rc && \
144146
${MAKE} -j $JOBS check-prep && \
145-
(cd t && ${MAKE} -j $JOBS check ${SYSTEM:+TESTS=\"$SYSTEM_TESTS\"}) && \
147+
(cd t && ${MAKE} -j $JOBS check ${SYSTEM:+TESTS=\"$SYSTEM_TESTS\"})"
148+
POSTCHECKCMDS="\
146149
${MAKE} code-coverage-capture &&
147150
lcov -l flux*-coverage.info && \
148151
rm -f coverage.xml && \
@@ -228,7 +231,8 @@ if test "$DISTCHECK" != "t"; then
228231
checks_group "${MAKECMDS}" "${MAKECMDS}" \
229232
|| checks_die "${MAKECMDS} failed"
230233
fi
231-
checks_group "${CHECKCMDS}" "${CHECKCMDS}"
234+
checks_group "${CHECKCMDS}" "${CHECKCMDS}" && \
235+
checks_group "${POSTCHECKCMDS}" "${POSTCHECKCMDS}"
232236
RC=$?
233237

234238
if test "$RECHECK" = "t" -a $RC -ne 0; then
@@ -239,7 +243,8 @@ if test "$RECHECK" = "t" -a $RC -ne 0; then
239243
if test -s t/t0000-sharness.trs; then
240244
cd t
241245
printf "::warning::make check failed, trying recheck in ./t\n"
242-
checks_group "make recheck" ${MAKE} -j ${JOBS} recheck
246+
checks_group "make recheck" ${MAKE} -j ${JOBS} recheck && \
247+
checks_group "${POSTCHECKCMDS}" "${POSTCHECKCMDS}"
243248
RC=$?
244249
cd
245250
else

0 commit comments

Comments
 (0)