diff --git a/src/Makefile.in b/src/Makefile.in index 3766b318..aa5e7fa7 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -99,10 +99,10 @@ $(GLDNS_OBJ): $(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) -c $(srcdir)/gldns/$(@:.lo=.c) -o $@ $(COMPAT_OBJ): - $(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) -c $(srcdir)/compat/$(@:.lo=.c) -o $@ + $(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) -Wno-error=pedantic -c $(srcdir)/compat/$(@:.lo=.c) -o $@ $(UTIL_OBJ): - $(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) -c $(srcdir)/util/$(@:.lo=.c) -o $@ + $(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) -Wno-error=pedantic -Wno-error=unused-parameter -c $(srcdir)/util/$(@:.lo=.c) -o $@ $(EXTENSION_OBJ): $(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) -c $(srcdir)/extension/$(@:.lo=.c) -o $@ diff --git a/src/test/tpkg/100-compile.tpkg/100-compile.pre b/src/test/tpkg/100-compile.tpkg/100-compile.pre index 6b76edba..f0bd9a5c 100644 --- a/src/test/tpkg/100-compile.tpkg/100-compile.pre +++ b/src/test/tpkg/100-compile.tpkg/100-compile.pre @@ -25,4 +25,14 @@ done rm -fr "${BUILDDIR}/build" mkdir "${BUILDDIR}/build" cd "${BUILDDIR}/build" -"${SRCROOT}/configure" $* --prefix "${BUILDDIR}/install" +if [ -z "$CFLAGS" ] +then + if (echo $*|grep -q CFLAGS) + then + "${SRCROOT}/configure" $* --prefix "${BUILDDIR}/install" + else + "${SRCROOT}/configure" CFLAGS="-Wpedantic -Werror" $* --prefix "${BUILDDIR}/install" + fi +else + "${SRCROOT}/configure" $* --prefix "${BUILDDIR}/install" +fi diff --git a/src/test/tpkg/200-stub-only-compile.tpkg/200-stub-only-compile.pre b/src/test/tpkg/200-stub-only-compile.tpkg/200-stub-only-compile.pre index 46686828..1aa7252f 100644 --- a/src/test/tpkg/200-stub-only-compile.tpkg/200-stub-only-compile.pre +++ b/src/test/tpkg/200-stub-only-compile.tpkg/200-stub-only-compile.pre @@ -25,4 +25,14 @@ done rm -fr "${BUILDDIR}/build-stub-only" mkdir "${BUILDDIR}/build-stub-only" cd "${BUILDDIR}/build-stub-only" -"${SRCROOT}/configure" $* --enable-stub-only +if [ -z "$CFLAGS" ] +then + if (echo $*|grep -q CFLAGS) + then + "${SRCROOT}/configure" $* --enable-stub-only + else + "${SRCROOT}/configure" CFLAGS="-Wpedantic -Werror" $* --enable-stub-only + fi +else + "${SRCROOT}/configure" $* --enable-stub-only +fi diff --git a/src/test/tpkg/300-event-loops-configure.tpkg/300-event-loops-configure.test b/src/test/tpkg/300-event-loops-configure.tpkg/300-event-loops-configure.test index 83ade30b..5242e211 100644 --- a/src/test/tpkg/300-event-loops-configure.tpkg/300-event-loops-configure.test +++ b/src/test/tpkg/300-event-loops-configure.tpkg/300-event-loops-configure.test @@ -7,10 +7,32 @@ rm -fr "${BUILDDIR}/build-event-loops" mkdir "${BUILDDIR}/build-event-loops" cd "${BUILDDIR}/build-event-loops" -"${SRCROOT}/configure" $* --enable-all-drafts --enable-all-debugging --with-getdns_query --with-libevent --with-libev --with-libuv \ - || "${SRCROOT}/configure" $* --enable-all-drafts --enable-all-debugging --with-getdns_query --with-libevent --with-libev \ - || "${SRCROOT}/configure" $* --enable-all-drafts --enable-all-debugging --with-getdns_query --with-libevent --with-libuv \ - || "${SRCROOT}/configure" $* --enable-all-drafts --enable-all-debugging --with-getdns_query --with-libev --with-libuv \ - || "${SRCROOT}/configure" $* --enable-all-drafts --enable-all-debugging --with-getdns_query --with-libevent \ - || "${SRCROOT}/configure" $* --enable-all-drafts --enable-all-debugging --with-getdns_query --with-libev \ - || "${SRCROOT}/configure" $* --enable-all-drafts --enable-all-debugging --with-getdns_query --with-libuv +if [ -z "$CFLAGS" ] +then + if (echo $*|grep -q CFLAGS) + then + "${SRCROOT}/configure" $* --enable-all-drafts --with-getdns_query --with-libevent --with-libev --with-libuv \ + || "${SRCROOT}/configure" $* --enable-all-drafts --with-getdns_query --with-libevent --with-libev \ + || "${SRCROOT}/configure" $* --enable-all-drafts --with-getdns_query --with-libevent --with-libuv \ + || "${SRCROOT}/configure" $* --enable-all-drafts --with-getdns_query --with-libev --with-libuv \ + || "${SRCROOT}/configure" $* --enable-all-drafts --with-getdns_query --with-libevent \ + || "${SRCROOT}/configure" $* --enable-all-drafts --with-getdns_query --with-libev \ + || "${SRCROOT}/configure" $* --enable-all-drafts --with-getdns_query --with-libuv + else + "${SRCROOT}/configure" CFLAGS="-Wpedantic -Werror" $* --enable-all-drafts --with-getdns_query --with-libevent --with-libev --with-libuv \ + || "${SRCROOT}/configure" CFLAGS="-Wpedantic -Werror" $* --enable-all-drafts --with-getdns_query --with-libevent --with-libev \ + || "${SRCROOT}/configure" CFLAGS="-Wpedantic -Werror" $* --enable-all-drafts --with-getdns_query --with-libevent --with-libuv \ + || "${SRCROOT}/configure" CFLAGS="-Wpedantic -Werror" $* --enable-all-drafts --with-getdns_query --with-libev --with-libuv \ + || "${SRCROOT}/configure" CFLAGS="-Wpedantic -Werror" $* --enable-all-drafts --with-getdns_query --with-libevent \ + || "${SRCROOT}/configure" CFLAGS="-Wpedantic -Werror" $* --enable-all-drafts --with-getdns_query --with-libev \ + || "${SRCROOT}/configure" CFLAGS="-Wpedantic -Werror" $* --enable-all-drafts --with-getdns_query --with-libuv + fi +else + "${SRCROOT}/configure" $* --enable-all-drafts --with-getdns_query --with-libevent --with-libev --with-libuv \ + || "${SRCROOT}/configure" $* --enable-all-drafts --with-getdns_query --with-libevent --with-libev \ + || "${SRCROOT}/configure" $* --enable-all-drafts --with-getdns_query --with-libevent --with-libuv \ + || "${SRCROOT}/configure" $* --enable-all-drafts --with-getdns_query --with-libev --with-libuv \ + || "${SRCROOT}/configure" $* --enable-all-drafts --with-getdns_query --with-libevent \ + || "${SRCROOT}/configure" $* --enable-all-drafts --with-getdns_query --with-libev \ + || "${SRCROOT}/configure" $* --enable-all-drafts --with-getdns_query --with-libuv +fi diff --git a/src/test/tpkg/323-event-loops-configure.tpkg/323-event-loops-configure.dsc b/src/test/tpkg/323-event-loops-configure.tpkg/323-event-loops-configure.dsc new file mode 100644 index 00000000..3d1dec87 --- /dev/null +++ b/src/test/tpkg/323-event-loops-configure.tpkg/323-event-loops-configure.dsc @@ -0,0 +1,16 @@ +BaseName: 323-event-loops-configure +Version: 1.0 +Description: Configure for maximum coverage +CreationDate: do 8 dec 2016 16:21:08 CET +Maintainer: Willem Toorop +Category: +Component: +CmdDepends: +Depends: +Help: +Pre: 323-event-loops-configure.pre +Post: +Test: 323-event-loops-configure.test +AuxFiles: +Passed: +Failure: diff --git a/src/test/tpkg/323-event-loops-configure.tpkg/323-event-loops-configure.pre b/src/test/tpkg/323-event-loops-configure.tpkg/323-event-loops-configure.pre new file mode 100644 index 00000000..a8423666 --- /dev/null +++ b/src/test/tpkg/323-event-loops-configure.tpkg/323-event-loops-configure.pre @@ -0,0 +1,14 @@ +# #-- 323-event-loops-configure.pre--# +# source the master var file when it's there +if [ -f ../.tpkg.var.master ] +then + source ../.tpkg.var.master +else + ( + cd .. + [ -f "${TPKG_SRCDIR}/setup-env.sh" ] \ + && sh "${TPKG_SRCDIR}/setup-env.sh" + ) && source ../.tpkg.var.master +fi +# use .tpkg.var.test for in test variable passing +[ -f .tpkg.var.test ] && source .tpkg.var.test diff --git a/src/test/tpkg/323-event-loops-configure.tpkg/323-event-loops-configure.test b/src/test/tpkg/323-event-loops-configure.tpkg/323-event-loops-configure.test new file mode 100644 index 00000000..b54bd321 --- /dev/null +++ b/src/test/tpkg/323-event-loops-configure.tpkg/323-event-loops-configure.test @@ -0,0 +1,16 @@ +# #-- 323-event-loops-configure.test --# +# source the master var file when it's there +[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master +# use .tpkg.var.test for in test variable passing +[ -f .tpkg.var.test ] && source .tpkg.var.test + +rm -fr "${BUILDDIR}/build-event-loops" +mkdir "${BUILDDIR}/build-event-loops" +cd "${BUILDDIR}/build-event-loops" +"${SRCROOT}/configure" $* --enable-all-drafts --enable-all-debugging --with-getdns_query --with-libevent --with-libev --with-libuv \ + || "${SRCROOT}/configure" $* --enable-all-drafts --enable-all-debugging --with-getdns_query --with-libevent --with-libev \ + || "${SRCROOT}/configure" $* --enable-all-drafts --enable-all-debugging --with-getdns_query --with-libevent --with-libuv \ + || "${SRCROOT}/configure" $* --enable-all-drafts --enable-all-debugging --with-getdns_query --with-libev --with-libuv \ + || "${SRCROOT}/configure" $* --enable-all-drafts --enable-all-debugging --with-getdns_query --with-libevent \ + || "${SRCROOT}/configure" $* --enable-all-drafts --enable-all-debugging --with-getdns_query --with-libev \ + || "${SRCROOT}/configure" $* --enable-all-drafts --enable-all-debugging --with-getdns_query --with-libuv diff --git a/src/test/tpkg/326-event-loops-compile.tpkg/326-event-loops-compile.dsc b/src/test/tpkg/326-event-loops-compile.tpkg/326-event-loops-compile.dsc new file mode 100644 index 00000000..c4760a36 --- /dev/null +++ b/src/test/tpkg/326-event-loops-compile.tpkg/326-event-loops-compile.dsc @@ -0,0 +1,16 @@ +BaseName: 326-event-loops-compile +Version: 1.0 +Description: Compile +CreationDate: do 8 dec 2016 16:21:21 CET +Maintainer: Willem Toorop +Category: +Component: +CmdDepends: +Depends: 300-event-loops-configure.tpkg +Help: +Pre: 326-event-loops-compile.pre +Post: 326-event-loops-compile.post +Test: 326-event-loops-compile.test +AuxFiles: +Passed: +Failure: diff --git a/src/test/tpkg/326-event-loops-compile.tpkg/326-event-loops-compile.post b/src/test/tpkg/326-event-loops-compile.tpkg/326-event-loops-compile.post new file mode 100644 index 00000000..d8029117 --- /dev/null +++ b/src/test/tpkg/326-event-loops-compile.tpkg/326-event-loops-compile.post @@ -0,0 +1,20 @@ +# #-- 326-event-loops-compile.post --# +# source the master var file when it's there +if [ -f ../.tpkg.var.master ] +then + source ../.tpkg.var.master +else + ( + cd .. + [ -f "${TPKG_SRCDIR}/setup-env.sh" ] \ + && sh "${TPKG_SRCDIR}/setup-env.sh" + ) && source ../.tpkg.var.master +fi +# use .tpkg.var.test for in test variable passing +[ -f .tpkg.var.test ] && source .tpkg.var.test + +for f in `cat restore-srcdir-configure-settings` +do + mv "${SRCROOT}/${f}.build-event-loops" "${SRCROOT}/${f}" +done + diff --git a/src/test/tpkg/326-event-loops-compile.tpkg/326-event-loops-compile.pre b/src/test/tpkg/326-event-loops-compile.tpkg/326-event-loops-compile.pre new file mode 100644 index 00000000..a4ef762d --- /dev/null +++ b/src/test/tpkg/326-event-loops-compile.tpkg/326-event-loops-compile.pre @@ -0,0 +1,24 @@ +# #-- 326-event-loops-compile.pre--# +# source the master var file when it's there +if [ -f ../.tpkg.var.master ] +then + source ../.tpkg.var.master +else + ( + cd .. + [ -f "${TPKG_SRCDIR}/setup-env.sh" ] \ + && sh "${TPKG_SRCDIR}/setup-env.sh" + ) && source ../.tpkg.var.master +fi +# use .tpkg.var.test for in test variable passing +[ -f .tpkg.var.test ] && source .tpkg.var.test + +echo "" > restore-srcdir-configure-settings +for f in `grep 'CONFIG_[FH][IE][LA][ED][SE]' "${SRCROOT}/configure.ac" | sed -e 's/^.*(\[//g' -e 's/\])//g'` +do + if [ -f "${SRCROOT}/$f" ] + then + mv "${SRCROOT}/${f}" "${SRCROOT}/${f}.build-event-loops" && \ + echo "$f" >> restore-srcdir-configure-settings + fi +done diff --git a/src/test/tpkg/326-event-loops-compile.tpkg/326-event-loops-compile.test b/src/test/tpkg/326-event-loops-compile.tpkg/326-event-loops-compile.test new file mode 100644 index 00000000..217cfd35 --- /dev/null +++ b/src/test/tpkg/326-event-loops-compile.tpkg/326-event-loops-compile.test @@ -0,0 +1,8 @@ +# #-- 326-event-loops-compile.test --# +# source the master var file when it's there +[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master +# use .tpkg.var.test for in test variable passing +[ -f .tpkg.var.test ] && source .tpkg.var.test + +cd "${BUILDDIR}/build-event-loops" +make