1 AT_BANNER([code coverage])
3 m4_define([_OVS_RUN_LCOV], [test $LCOV = false || lcov -b $abs_top_builddir -d $abs_top_builddir $1])
5 AT_SETUP([initialize lcov])
6 AT_CHECK([rm -fr $abs_builddir/coverage.html])
7 AT_CHECK([rm -f $abs_builddir/coverage.info])
8 AT_CHECK([$LCOV || exit 77])
9 AT_CHECK([_OVS_RUN_LCOV([-c -i -o - > $abs_builddir/coverage.info])], [0], [ignore], [ignore])
12 # OVS_CHECK_LCOV(COMMAND, [STATUS = `0'], [STDOUT = `'], [STDERR = `'],
13 # [RUN-IF-FAIL], [RUN-IF-PASS])
15 # This macro is equivalent to AT_CHECK, except that COMMAND should be a single
16 # shell command that invokes a program whose code coverage is to be measured
17 # (if configure was invoked with --coverage).
18 m4_define([OVS_CHECK_LCOV],
19 [AT_CHECK([_OVS_RUN_LCOV([-z])], [0], [ignore], [ignore])
21 AT_CHECK([_OVS_RUN_LCOV([-c -o - >> $abs_builddir/coverage.info])], [0], [ignore], [ignore])])