From 499555b8a5c4ce71e335d50e2fb52b41876057a8 Mon Sep 17 00:00:00 2001 From: Sara Dickinson Date: Thu, 14 Nov 2019 17:58:11 +0000 Subject: [PATCH] More fixes for remaining tests.. --- .../225-stub-only-valgrind-checks.test | 2 +- .../275-server-capabilities.clean.sh | 2 +- .../280-limit_outstanding_queries.pre | 4 ++-- .../285-out_of_filedescriptors.pre | 11 +++++---- .../400-static-analysis.dsc | 2 +- .../400-static-analysis.post | 6 ----- .../400-static-analysis.pre | 24 ++++++------------- 7 files changed, 18 insertions(+), 33 deletions(-) diff --git a/src/test/tpkg/225-stub-only-valgrind-checks.tpkg/225-stub-only-valgrind-checks.test b/src/test/tpkg/225-stub-only-valgrind-checks.tpkg/225-stub-only-valgrind-checks.test index 1c957404..bd084b53 100644 --- a/src/test/tpkg/225-stub-only-valgrind-checks.tpkg/225-stub-only-valgrind-checks.test +++ b/src/test/tpkg/225-stub-only-valgrind-checks.tpkg/225-stub-only-valgrind-checks.test @@ -14,7 +14,7 @@ qwerlkjhasdfpuiqwyerm.1234kjhrqwersv.com -A _acme-challenge.getdnsapi.net EOT ( - if ! "${BUILDDIR}/build-stub-only/libtool" exec valgrind -v --log-file=valgrind.log --leak-check=full --error-exitcode=1 --track-origins=yes "${GETDNS_STUB_QUERY}" -F queries -f "${TPKG_NAME}.ds" +dnssec_return_validation_chain + if ! valgrind -v --log-file=valgrind.log --leak-check=full --error-exitcode=1 --track-origins=yes "${GETDNS_STUB_QUERY}" -F queries -f "${TPKG_NAME}.ds" +dnssec_return_validation_chain then exit 1 fi diff --git a/src/test/tpkg/275-server-capabilities.tpkg/275-server-capabilities.clean.sh b/src/test/tpkg/275-server-capabilities.tpkg/275-server-capabilities.clean.sh index 223c6928..76a94810 100755 --- a/src/test/tpkg/275-server-capabilities.tpkg/275-server-capabilities.clean.sh +++ b/src/test/tpkg/275-server-capabilities.tpkg/275-server-capabilities.clean.sh @@ -1,4 +1,4 @@ #!/bin/sh make clean || true -rm -fr .libs Makefile *_out valgrind.log +rm -fr CMakeCache.txt *_out valgrind.log diff --git a/src/test/tpkg/280-limit_outstanding_queries.tpkg/280-limit_outstanding_queries.pre b/src/test/tpkg/280-limit_outstanding_queries.tpkg/280-limit_outstanding_queries.pre index 29fe5f29..9063d28c 100644 --- a/src/test/tpkg/280-limit_outstanding_queries.tpkg/280-limit_outstanding_queries.pre +++ b/src/test/tpkg/280-limit_outstanding_queries.tpkg/280-limit_outstanding_queries.pre @@ -7,8 +7,8 @@ ( BUILDDIR4SED=`echo "${BUILDDIR}/build-stub-only" | sed 's/\//\\\\\//g'` sed -e "s/@BUILDDIR@/${BUILDDIR4SED}/g" \ - -e "s/@TPKG_NAME@/${TPKG_NAME}/g" "${TPKG_NAME}.Makefile" -) > Makefile + -e "s/@TPKG_NAME@/${TPKG_NAME}/g" "${TPKG_NAME}.cmake" +) > CMakeLists.txt if [[ "$OSTYPE" == "darwin"* ]]; then sed -i '' -e "s/libgetdns.so/libgetdns.dylib/g" CMakeLists.txt diff --git a/src/test/tpkg/285-out_of_filedescriptors.tpkg/285-out_of_filedescriptors.pre b/src/test/tpkg/285-out_of_filedescriptors.tpkg/285-out_of_filedescriptors.pre index 6e7ff3ff..f4f0167d 100644 --- a/src/test/tpkg/285-out_of_filedescriptors.tpkg/285-out_of_filedescriptors.pre +++ b/src/test/tpkg/285-out_of_filedescriptors.tpkg/285-out_of_filedescriptors.pre @@ -5,10 +5,11 @@ [ -f .tpkg.var.test ] && source .tpkg.var.test ( - grep '^CC=' "${BUILDDIR}/build-stub-only/src/Makefile" - grep '^LDFLAGS=' "${BUILDDIR}/build-stub-only/src/Makefile" - BUILDDIR4SED=`echo "${BUILDDIR}/build-stub-only" | sed 's/\//\\\\\//g'` sed -e "s/@BUILDDIR@/${BUILDDIR4SED}/g" \ - -e "s/@TPKG_NAME@/${TPKG_NAME}/g" "${TPKG_NAME}.Makefile" -) > Makefile + -e "s/@TPKG_NAME@/${TPKG_NAME}/g" "${TPKG_NAME}.cmake" +) > CMakeLists.txt + +if [[ "$OSTYPE" == "darwin"* ]]; then + sed -i '' -e "s/libgetdns.so/libgetdns.dylib/g" CMakeLists.txt +fi diff --git a/src/test/tpkg/400-static-analysis.tpkg/400-static-analysis.dsc b/src/test/tpkg/400-static-analysis.tpkg/400-static-analysis.dsc index 33cf7bb3..bcc603f8 100644 --- a/src/test/tpkg/400-static-analysis.tpkg/400-static-analysis.dsc +++ b/src/test/tpkg/400-static-analysis.tpkg/400-static-analysis.dsc @@ -9,7 +9,7 @@ CmdDepends: scan-build Depends: Help: Pre: 400-static-analysis.pre -Post: 400-static-analysis.post +Post: Test: 400-static-analysis.test AuxFiles: Passed: diff --git a/src/test/tpkg/400-static-analysis.tpkg/400-static-analysis.post b/src/test/tpkg/400-static-analysis.tpkg/400-static-analysis.post index 5551a73d..3ccc7cbc 100644 --- a/src/test/tpkg/400-static-analysis.tpkg/400-static-analysis.post +++ b/src/test/tpkg/400-static-analysis.tpkg/400-static-analysis.post @@ -12,9 +12,3 @@ else 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-static-analysis" "${SRCROOT}/${f}" -done - diff --git a/src/test/tpkg/400-static-analysis.tpkg/400-static-analysis.pre b/src/test/tpkg/400-static-analysis.tpkg/400-static-analysis.pre index 9a95798c..10c46df9 100644 --- a/src/test/tpkg/400-static-analysis.tpkg/400-static-analysis.pre +++ b/src/test/tpkg/400-static-analysis.tpkg/400-static-analysis.pre @@ -13,23 +13,13 @@ 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-static-analysis" && \ - echo "$f" >> restore-srcdir-configure-settings - fi -done rm -fr "${BUILDDIR}/build-static-analysis" mkdir "${BUILDDIR}/build-static-analysis" cd "${BUILDDIR}/build-static-analysis" -"${SRCROOT}/configure" $* --prefix "${BUILDDIR}/install" --enable-all-drafts --with-stubby --with-libevent --with-libev --with-libuv \ - || "${SRCROOT}/configure" $* --prefix "${BUILDDIR}/install" --enable-all-drafts --with-stubby --with-libevent --with-libev \ - || "${SRCROOT}/configure" $* --prefix "${BUILDDIR}/install" --enable-all-drafts --with-stubby --with-libevent --with-libuv \ - || "${SRCROOT}/configure" $* --prefix "${BUILDDIR}/install" --enable-all-drafts --with-stubby --with-libev --with-libuv \ - || "${SRCROOT}/configure" $* --prefix "${BUILDDIR}/install" --enable-all-drafts --with-stubby --with-libevent \ - || "${SRCROOT}/configure" $* --prefix "${BUILDDIR}/install" --enable-all-drafts --with-stubby --with-libev \ - || "${SRCROOT}/configure" $* --prefix "${BUILDDIR}/install" --enable-all-drafts --with-stubby --with-libuv - +(rm CMakeCache.txt & cmake -DENABLE_DRAFT_MDNS_SUPPORT=ON -DBUILD_STUBBY=ON -DCMAKE_INSTALL_PREFIX=../install -DUSE_LIBEVENT2=ON -DUSE_LIBEV=ON -DUSE_LIBUV=ON $* ${SRCROOT}) || \ +(rm CMakeCache.txt & cmake -DENABLE_DRAFT_MDNS_SUPPORT=ON -DBUILD_STUBBY=ON -DCMAKE_INSTALL_PREFIX=../install -DUSE_LIBEVENT2=ON -DUSE_LIBEV=ON $* ${SRCROOT}) || \ +(rm CMakeCache.txt & cmake -DENABLE_DRAFT_MDNS_SUPPORT=ON -DBUILD_STUBBY=ON -DCMAKE_INSTALL_PREFIX=../install -DUSE_LIBEVENT2=ON -DUSE_LIBUV=ON $* ${SRCROOT}) || \ +(rm CMakeCache.txt & cmake -DENABLE_DRAFT_MDNS_SUPPORT=ON -DBUILD_STUBBY=ON -DCMAKE_INSTALL_PREFIX=../install -DUSE_LIBEV=ON -DUSE_LIBUV=ON $* ${SRCROOT}) || \ +(rm CMakeCache.txt & cmake -DENABLE_DRAFT_MDNS_SUPPORT=ON -DBUILD_STUBBY=ON -DCMAKE_INSTALL_PREFIX=../install -DUSE_LIBEVENT2=ON $* ${SRCROOT}) || \ +(rm CMakeCache.txt & cmake -DENABLE_DRAFT_MDNS_SUPPORT=ON -DBUILD_STUBBY=ON -DCMAKE_INSTALL_PREFIX=../install -DUSE_LIBEV=ON $* ${SRCROOT}) || \ +(rm CMakeCache.txt & cmake -DENABLE_DRAFT_MDNS_SUPPORT=ON -DBUILD_STUBBY=ON -DCMAKE_INSTALL_PREFIX=../install -DUSE_LIBUV=ON $* ${SRCROOT})