Skip to content

Commit

Permalink
tests: Remove bit-rotted support for "lcov".
Browse files Browse the repository at this point in the history
At one point I got the "lcov" utilities to work well with OVS.  Then I
didn't try to use them again for a year or so, and when I did I found that
it didn't work at all.  I wasn't able to fix the problem easily, so it
seems better to remove the feature than to leave around broken code.

Signed-off-by: Ben Pfaff <[email protected]>
  • Loading branch information
blp committed Jul 20, 2012
1 parent 5cc2c26 commit 8faa5a2
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 157 deletions.
6 changes: 0 additions & 6 deletions README-gcov
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,3 @@ code-coverage related options:
--enable-coverage=yes

Build with gcov code coverage support.

If you enable coverage and you have the "lcov" and "genhtml"
programs in PATH, then you may run "make check-lcov" to produce a
directory "tests/coverage.html" in the build directory with an
analysis of the test suite's coverage. lcov is available at
http://ltp.sourceforge.net/coverage/lcov.php
2 changes: 1 addition & 1 deletion m4/openvswitch.m4
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ AC_DEFUN([OVS_CHECK_COVERAGE],
[AC_HELP_STRING([--enable-coverage],
[Enable gcov coverage tool.])],
[case "${enableval}" in
(lcov|yes) coverage=true ;;
(yes) coverage=true ;;
(no) coverage=false ;;
(*) AC_MSG_ERROR([bad value ${enableval} for --enable-coverage]) ;;
esac],
Expand Down
58 changes: 0 additions & 58 deletions tests/automake.mk
Original file line number Diff line number Diff line change
Expand Up @@ -84,64 +84,6 @@ check-pycov: all tests/atconfig tests/atlocal $(TESTSUITE) clean-pycov
@echo
@COVERAGE_FILE=$(COVERAGE_FILE) $(COVERAGE) report

# lcov support

lcov_wrappers = \
tests/lcov/ovs-appctl \
tests/lcov/ovs-ofctl \
tests/lcov/ovs-vsctl \
tests/lcov/ovs-vswitchd \
tests/lcov/ovsdb-client \
tests/lcov/ovsdb-server \
tests/lcov/ovsdb-tool \
tests/lcov/test-aes128 \
tests/lcov/test-bundle \
tests/lcov/test-byte-order \
tests/lcov/test-classifier \
tests/lcov/test-csum \
tests/lcov/test-file_name \
tests/lcov/test-flows \
tests/lcov/test-hash \
tests/lcov/test-heap \
tests/lcov/test-hmap \
tests/lcov/test-json \
tests/lcov/test-jsonrpc \
tests/lcov/test-list \
tests/lcov/test-lockfile \
tests/lcov/test-multipath \
tests/lcov/test-odp \
tests/lcov/test-ovsdb \
tests/lcov/test-packets \
tests/lcov/test-random \
tests/lcov/test-reconnect \
tests/lcov/test-sha1 \
tests/lcov/test-stp \
tests/lcov/test-timeval \
tests/lcov/test-type-props \
tests/lcov/test-unix-socket \
tests/lcov/test-uuid \
tests/lcov/test-vconn

$(lcov_wrappers): tests/lcov-wrapper.in
@test -d tests/lcov || mkdir tests/lcov
sed -e 's,[@]abs_top_builddir[@],$(abs_top_builddir),' \
-e 's,[@]wrap_program[@],$@,' \
$(top_srcdir)/tests/lcov-wrapper.in > $@.tmp
chmod +x $@.tmp
mv $@.tmp $@
CLEANFILES += $(lcov_wrappers)
EXTRA_DIST += tests/lcov-wrapper.in

LCOV = lcov -b $(abs_top_builddir) -d $(abs_top_builddir) -q
check-lcov: all tests/atconfig tests/atlocal $(TESTSUITE) $(lcov_wrappers)
rm -fr tests/coverage.html tests/coverage.info
$(LCOV) -c -i -o - > tests/coverage.info
$(SHELL) '$(TESTSUITE)' -C tests CHECK_LCOV=true DISABLE_LCOV=false AUTOTEST_PATH='tests/lcov:$(AUTOTEST_PATH)' $(TESTSUITEFLAGS); \
rc=$$?; \
echo "Producing coverage.html..."; \
cd tests && genhtml -q -o coverage.html coverage.info; \
exit $$rc

# valgrind support

valgrind_wrappers = \
Expand Down
4 changes: 0 additions & 4 deletions tests/daemon.at
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
AT_BANNER([daemon unit tests - C])

AT_SETUP([daemon])
AT_SKIP_IF([test "$CHECK_LCOV" = true]) # lcov wrapper make pids differ
OVSDB_INIT([db])
AT_CAPTURE_FILE([pid])
AT_CAPTURE_FILE([expected])
Expand All @@ -20,7 +19,6 @@ AT_CHECK([test ! -e pid])
AT_CLEANUP

AT_SETUP([daemon --monitor])
AT_SKIP_IF([test "$CHECK_LCOV" = true]) # lcov wrapper make pids differ
OVSDB_INIT([db])
AT_CAPTURE_FILE([pid])
AT_CAPTURE_FILE([parent])
Expand Down Expand Up @@ -69,7 +67,6 @@ OVS_WAIT_WHILE([kill -0 `cat parent` || kill -0 `cat newpid` || test -e pid],
AT_CLEANUP

AT_SETUP([daemon --detach])
AT_SKIP_IF([test "$CHECK_LCOV" = true]) # lcov wrapper make pids differ
AT_CAPTURE_FILE([pid])
OVSDB_INIT([db])
# Start the daemon and make sure that the pidfile exists immediately.
Expand All @@ -86,7 +83,6 @@ AT_CHECK([test ! -e pid])
AT_CLEANUP

AT_SETUP([daemon --detach --monitor])
AT_SKIP_IF([test "$CHECK_LCOV" = true]) # lcov wrapper make pids differ
m4_define([CHECK],
[AT_CHECK([$1], [$2], [$3], [$4], [kill `cat daemon monitor`])])
OVSDB_INIT([db])
Expand Down
63 changes: 0 additions & 63 deletions tests/lcov-wrapper.in

This file was deleted.

5 changes: 0 additions & 5 deletions tests/ovs-vsctl.at
Original file line number Diff line number Diff line change
Expand Up @@ -896,11 +896,6 @@ AT_CLEANUP
AT_SETUP([database commands -- wait-until must wait])
AT_KEYWORDS([ovs-vsctl])

# Disable lcov for this test. All the programs running in parallel
# race badly on access to profiling data.
DISABLE_LCOV=true
export DISABLE_LCOV

OVS_VSCTL_SETUP

# Start ovs-vsctls in background.
Expand Down
20 changes: 0 additions & 20 deletions tests/uuid.at
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,7 @@ m4_define([CHECK_UUID],
exit 1
fi])

# This test is a strict subset of the larger test down below, but it
# completes in a realistic amount of time with the "lcov" wrapper.
AT_SETUP([UUID generation])
AT_KEYWORDS([UUID])
AT_CHECK([test-uuid > uuid])
AT_CHECK([
uuid=`cat uuid`
CHECK_UUID])
AT_CLEANUP

# This test is a strict subset of the larger test down below, but it
# completes in a realistic amount of time with the "lcov" wrapper.
AT_SETUP([UUID parsing and serialization])
AT_KEYWORDS([UUID])
AT_CHECK([test-uuid f47ac10b-58cc-4372-a567-0e02b2c3d479], [0],
[f47ac10b-58cc-4372-a567-0e02b2c3d479
])
AT_CLEANUP

AT_SETUP([UUID generation, parsing, serialization])
AT_SKIP_IF([test "$CHECK_LCOV" = true]) # lcov makes this test absurdly slow
AT_KEYWORDS([UUID])
AT_CHECK([
uuids=
Expand Down

0 comments on commit 8faa5a2

Please sign in to comment.