tests: Remove bit-rotted support for "lcov".
authorBen Pfaff <blp@nicira.com>
Fri, 20 Jul 2012 17:49:06 +0000 (10:49 -0700)
committerBen Pfaff <blp@nicira.com>
Fri, 20 Jul 2012 20:10:48 +0000 (13:10 -0700)
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 <blp@nicira.com>
README-gcov
m4/openvswitch.m4
tests/automake.mk
tests/daemon.at
tests/lcov-wrapper.in [deleted file]
tests/ovs-vsctl.at
tests/uuid.at

index 01c49cc713713065a57f5aab356ebc1554794537..2fe9f3a7cfe119ecad934d895349a82254a144be 100644 (file)
@@ -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
index dca9f5fe716f8111b4f6dc0c8c809746fa68b0c0..eca6010f5d8988b39630594e2dcf1a4414d9a703 100644 (file)
@@ -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],
index 3e42a3ecfac8a0ca6a4b0a4aad867a2016f80d64..20f9e827f7137094f67811573147e49e47015ab7 100644 (file)
@@ -84,64 +84,6 @@ check-pycov: all tests/atconfig tests/atlocal $(TESTSUITE) clean-pycov
        @echo
        @COVERAGE_FILE=$(COVERAGE_FILE) $(COVERAGE) report
 \f
-# 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
-\f
 # valgrind support
 
 valgrind_wrappers = \
index 8ac70e8ad7fe276e78b04de3387eb5cb3c33c91b..3f6c269d8862eab952deac84c923197ce988b336 100644 (file)
@@ -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])
@@ -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])
@@ -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.
@@ -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])
diff --git a/tests/lcov-wrapper.in b/tests/lcov-wrapper.in
deleted file mode 100755 (executable)
index 0c6a359..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-#! /bin/sh
-
-abs_top_builddir='@abs_top_builddir@'
-wrap_program=`basename '@wrap_program@'`
-
-# Strip the first directory from $PATH that contains $wrap_program,
-# so that below we run the real $wrap_program, not ourselves.
-not_found=true
-new_path=
-first=true
-save_IFS=$IFS
-IFS=:
-for dir in $PATH; do
-    IFS=$save_IFS
-    if $not_found && test -x "$dir/$wrap_program"; then
-        not_found=false
-    else
-        if $first; then
-            first=false
-            new_path=$dir
-        else
-            new_path=$new_path:$dir
-        fi
-    fi
-done
-IFS=$save_IFS
-if $not_found; then
-    echo "$0: error: cannot find $wrap_program in \$PATH" >&2
-    exit 1
-fi
-PATH=$new_path
-export PATH
-
-if test "$DISABLE_LCOV" = true; then
-    exec $wrap_program "$@"
-    exit 1
-fi
-
-# XXX Probably want some kind of synchronization here to deal with
-# programs running in parallel.
-LCOV="lcov -b $abs_top_builddir -d $abs_top_builddir -q"
-$LCOV -z
-
-# Run the subprocess and propagate signals to it.
-for signal in 1 2 3 5 15; do
-    trap "kill -$signal \$!     # Propagate signal
-          trap - $signal        # Reset signal to default
-          wait                  # Wait for child to die
-          kill -$signal $$      # Kill ourselves with same signal
-          exit 1                # Exit in case 'kill' failed" $signal
-done
-$wrap_program 0<&0 "$@" &       # 0<&0 prevents shell from closing stdin
-exec 0</dev/null                # Don't hold stdin open unnecessarily
-wait $!; rc=$?
-
-# Run lcov, but only if some .gcda files were produced, since lcov
-# complains otherwise.
-for file in `find "$abs_top_builddir" -name '*.gcda'`; do
-    $LCOV -c -o - >> "$abs_top_builddir/tests/coverage.info"
-    break
-done
-
-exit $rc
index b9346cc4e56ee1e0586c14c67ee55d40182b14bd..71c46cd419610ce45eb80dd96aea8068fa01c3c5 100644 (file)
@@ -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.
index 24f7180fb3d87720de3a8ed8c52a1fb32a179065..2a82fb1799ed2905423f8df83d64f0e99d2585c7 100644 (file)
@@ -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=