summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorng0 <ng0@n0.is>2019-06-07 18:02:37 +0000
committerng0 <ng0@n0.is>2019-06-07 18:02:37 +0000
commit765f80c1e27acb585eebef46a97ffc769e452879 (patch)
tree247a639001356242078931d766b504b711fc29b0
parentbc31e1fa180d75fe68fa5fbd82cdade68b80c8b7 (diff)
downloadgnurl-765f80c1e27acb585eebef46a97ffc769e452879.tar.gz
gnurl-765f80c1e27acb585eebef46a97ffc769e452879.tar.bz2
gnurl-765f80c1e27acb585eebef46a97ffc769e452879.zip
add --(en,dis)able-valgrind option to really disable valgrindgnurl-7.65.1
during tests. Default to off because with my OS and my version of valgrind this blows up the testsuite into one happy coredump party (9 exceptions to this).
-rwxr-xr-xconfigure-gnurl1
-rwxr-xr-xconfigure.ac27
-rw-r--r--tests/Makefile.am4
3 files changed, 32 insertions, 0 deletions
diff --git a/configure-gnurl b/configure-gnurl
index f29c14d07..1c760f859 100755
--- a/configure-gnurl
+++ b/configure-gnurl
@@ -19,4 +19,5 @@ fi
--disable-imap --disable-smtp --disable-gopher \
--disable-file --disable-ftp --disable-smb \
--without-libpsl \
+ --disable-valgrind \
"$@"
diff --git a/configure.ac b/configure.ac
index f14bee011..6574d1b02 100755
--- a/configure.ac
+++ b/configure.ac
@@ -175,9 +175,34 @@ curl_verbose_msg="enabled (--disable-verbose)"
curl_rtmp_msg="no (--with-librtmp)"
curl_mtlnk_msg="no (--with-libmetalink)"
curl_psl_msg="no (--with-libpsl)"
+ valgrind_msg="no (--enable-valgrind)"
ssl_backends=
+
+dnl valgrind for tests -- coredumps all over the place with the
+dnl valgrind version I here, fixes welcome.
+AC_MSG_CHECKING(wether to enable valgrind in testsuite)
+AC_ARG_ENABLE([valgrind],
+ [AS_HELP_STRING([--enable-valgrind],
+ [Enable valgrind for tests])],
+ [valgrind=${enableval}],
+ [valgrind=no])
+AC_MSG_RESULT($valgrind)
+AS_IF([test "x$valgrind" = "xno"],
+ [AM_CONDITIONAL([VALGRIND],
+ false)
+ AC_DEFINE([VALGRIND],
+ [0],
+ [Running tests with -n])
+ valgrind_msg="no"],
+ [AM_CONDITIONAL([VALGRIND],
+ true)
+ AC_DEFINE([VALGRIND],
+ [1],
+ [Running tests with valgrind])
+ valgrind_msg="yes"])
+
dnl
dnl Save some initial values the user might have provided
dnl
@@ -4341,6 +4366,7 @@ if test "x$USE_LIBRTMP" = "x1"; then
SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS RTMP"
fi
+
dnl replace spaces with newlines
dnl sort the lines
dnl replace the newlines back to spaces
@@ -4442,6 +4468,7 @@ AC_MSG_NOTICE([Configured to build gnurl/libgnurl:
HTTP2: ${curl_h2_msg}
Protocols: ${SUPPORT_PROTOCOLS}
Features: ${SUPPORT_FEATURES}
+ valgrind tests: ${valgrind_msg}
])
if test -n "$experimental"; then
cat >&2 << _EOF
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 157d8cf48..027cc6ea9 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -90,7 +90,11 @@ curl:
if CROSSCOMPILING
TEST = @echo "NOTICE: we can't run the tests when cross-compiling!"
else # if not cross-compiling:
+if VALGRIND
TEST = srcdir=$(srcdir) $(PERL) $(PERLFLAGS) $(srcdir)/runtests.pl
+else
+TEST = srcdir=$(srcdir) $(PERL) $(PERLFLAGS) $(srcdir)/runtests.pl -n
+endif # disable_valgrind
TEST_Q = -a -s
TEST_AM = -a -am
TEST_F = -a -p -r