Skip to content

Commit 405b02a

Browse files
committed
Add testcase using SOURCE_DATE_EPOCH - and generate associated error.
Signed-off-by: Henry Cox <[email protected]>
1 parent 2ec983b commit 405b02a

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

tests/gendiffcov/errs/msgtest.sh

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,25 @@ if [ 0 != $? ] ; then
577577
fi
578578
fi
579579
580-
580+
581+
# use jan1 1970 as epoch
582+
echo SOURCE_DATE_EPOCH=0 genhtml $DIFFCOV_OPTS initial.info -o epoch
583+
SOURCE_DATE_EPOCH=0 $COVER $GENHTML_TOOL $DIFFCOV_OPTS initial.info --annotate $ANNOTATE_SCRIPT -o epoch 2>&1 | tee epoch.log
584+
if [ 0 == ${PIPESTATUS[0]} ] ; then
585+
echo "ERROR: missed epoch error"
586+
if [ 0 == $KEEP_GOING ] ; then
587+
exit 1
588+
fi
589+
fi
590+
grep -E "ERROR: \(inconsistent\) .+ 'SOURCE_DATE_EPOCH=0' .+ is older than annotate time" epoch.log
591+
if [ 0 != $? ] ; then
592+
echo "ERROR: missing epoch"
593+
if [ 0 == $KEEP_GOING ] ; then
594+
exit 1
595+
fi
596+
fi
597+
598+
581599
echo "Tests passed"
582600
583601
if [ "x$COVER" != "x" ] && [ $LOCAL_COVERAGE == 1 ] ; then

0 commit comments

Comments
 (0)