diff --git a/src/test/tpkg/125-valgrind-checks.tpkg/125-valgrind-checks.test b/src/test/tpkg/125-valgrind-checks.tpkg/125-valgrind-checks.test index 4ea22337..4ec750d6 100644 --- a/src/test/tpkg/125-valgrind-checks.tpkg/125-valgrind-checks.test +++ b/src/test/tpkg/125-valgrind-checks.tpkg/125-valgrind-checks.test @@ -21,7 +21,7 @@ localhost. -X EOT ( - if ! "${BUILDDIR}/build/libtool" exec valgrind -v --log-file=valgrind.log --leak-check=full --error-exitcode=1 --track-origins=yes "${GETDNS_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_QUERY}" -F queries -f "${TPKG_NAME}.ds" +dnssec_return_validation_chain then exit 1 fi diff --git a/src/test/tpkg/270-header-extension.tpkg/270-header-extension.cmake b/src/test/tpkg/270-header-extension.tpkg/270-header-extension.cmake index a5efc78b..a649082e 100644 --- a/src/test/tpkg/270-header-extension.tpkg/270-header-extension.cmake +++ b/src/test/tpkg/270-header-extension.tpkg/270-header-extension.cmake @@ -5,5 +5,5 @@ add_executable(@TPKG_NAME@ @TPKG_NAME@.c) target_include_directories(@TPKG_NAME@ PRIVATE @BUILDDIR@) add_library(libgetdns SHARED IMPORTED ) -set_target_properties(libgetdns PROPERTIES IMPORTED_LOCATION @BUILDDIR@/libgetdns.dylib ) +set_target_properties(libgetdns PROPERTIES IMPORTED_LOCATION @BUILDDIR@/libgetdns.so ) target_link_libraries(@TPKG_NAME@ libgetdns) \ No newline at end of file diff --git a/src/test/tpkg/270-header-extension.tpkg/270-header-extension.pre b/src/test/tpkg/270-header-extension.tpkg/270-header-extension.pre index 37fcd455..8cce3b54 100644 --- a/src/test/tpkg/270-header-extension.tpkg/270-header-extension.pre +++ b/src/test/tpkg/270-header-extension.tpkg/270-header-extension.pre @@ -9,3 +9,7 @@ sed -e "s/@BUILDDIR@/${BUILDDIR4SED}/g" \ -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 \ No newline at end of file diff --git a/src/test/tpkg/275-server-capabilities.tpkg/275-server-capabilities.test b/src/test/tpkg/275-server-capabilities.tpkg/275-server-capabilities.test index 06476a1b..daf55c78 100644 --- a/src/test/tpkg/275-server-capabilities.tpkg/275-server-capabilities.test +++ b/src/test/tpkg/275-server-capabilities.tpkg/275-server-capabilities.test @@ -9,7 +9,7 @@ LOCALHOST=`${GETDNS_STUB_QUERY} '{namespaces:[GETDNS_NAMESPACE_LOCALNAMES]}' -A | sed -e 's/^[^"]*"//g' -e 's/"[^"]*$//g'` echo "localhost: $LOCALHOST" -cmake . && make && "${BUILDDIR}/build-stub-only/libtool" exec valgrind -v --log-file=valgrind.log --leak-check=full --error-exitcode=1 --track-origins=yes "./${TPKG_NAME}" ${LOCALHOST} | ( +cmake . && make && valgrind -v --log-file=valgrind.log --leak-check=full --error-exitcode=1 --track-origins=yes "./${TPKG_NAME}" ${LOCALHOST} | ( read PORT read PORT2 diff --git a/src/test/tpkg/280-limit_outstanding_queries.tpkg/280-limit_outstanding_queries.Makefile b/src/test/tpkg/280-limit_outstanding_queries.tpkg/280-limit_outstanding_queries.Makefile deleted file mode 100644 index 70d86616..00000000 --- a/src/test/tpkg/280-limit_outstanding_queries.tpkg/280-limit_outstanding_queries.Makefile +++ /dev/null @@ -1,15 +0,0 @@ -builddir = @BUILDDIR@ -testname = @TPKG_NAME@ -LIBTOOL = $(builddir)/libtool - -CFLAGS=-Wall -Wextra -I$(builddir)/src -LDLIBS=$(builddir)/src/libgetdns.la - -.SUFFIXES: .c .o .a .lo .h - -.c.lo: - $(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) -c $< -o $@ - -$(testname): $(testname).lo - $(LIBTOOL) --tag=CC --mode=link $(CC) $(LDLIBS) $(LDFLAGS) -o $(testname) $(testname).lo - diff --git a/src/test/tpkg/280-limit_outstanding_queries.tpkg/280-limit_outstanding_queries.cmake b/src/test/tpkg/280-limit_outstanding_queries.tpkg/280-limit_outstanding_queries.cmake new file mode 100644 index 00000000..a649082e --- /dev/null +++ b/src/test/tpkg/280-limit_outstanding_queries.tpkg/280-limit_outstanding_queries.cmake @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 3.5) +project (@TPKG_NAME@) +add_executable(@TPKG_NAME@ @TPKG_NAME@.c) + +target_include_directories(@TPKG_NAME@ PRIVATE @BUILDDIR@) + +add_library(libgetdns SHARED IMPORTED ) +set_target_properties(libgetdns PROPERTIES IMPORTED_LOCATION @BUILDDIR@/libgetdns.so ) +target_link_libraries(@TPKG_NAME@ libgetdns) \ No newline at end of file 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 b4ee91ac..29fe5f29 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 @@ -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 + +if [[ "$OSTYPE" == "darwin"* ]]; then + sed -i '' -e "s/libgetdns.so/libgetdns.dylib/g" CMakeLists.txt +fi \ No newline at end of file diff --git a/src/test/tpkg/280-limit_outstanding_queries.tpkg/280-limit_outstanding_queries.test b/src/test/tpkg/280-limit_outstanding_queries.tpkg/280-limit_outstanding_queries.test index f8d5d556..82c6affe 100644 --- a/src/test/tpkg/280-limit_outstanding_queries.tpkg/280-limit_outstanding_queries.test +++ b/src/test/tpkg/280-limit_outstanding_queries.tpkg/280-limit_outstanding_queries.test @@ -19,7 +19,7 @@ echo "# queries: $NQUERIES" # which is smaller than 5 seconds default query timeout value, # so the test should succeed. -make && "${BUILDDIR}/build-stub-only/libtool" exec valgrind -v --log-file=valgrind.log --leak-check=full --error-exitcode=1 --track-origins=yes "./${TPKG_NAME}" ${LOCALHOST} | ( +cmake . && make && valgrind -v --log-file=valgrind.log --leak-check=full --error-exitcode=1 --track-origins=yes "./${TPKG_NAME}" ${LOCALHOST} | ( read PORT ${GETDNS_STUB_QUERY} -s @${LOCALHOST}:$PORT TXT \ -a -F "./${TPKG_NAME}.queries" \ diff --git a/src/test/tpkg/285-out_of_filedescriptors.tpkg/285-out_of_filedescriptors.Makefile b/src/test/tpkg/285-out_of_filedescriptors.tpkg/285-out_of_filedescriptors.Makefile deleted file mode 100644 index 70d86616..00000000 --- a/src/test/tpkg/285-out_of_filedescriptors.tpkg/285-out_of_filedescriptors.Makefile +++ /dev/null @@ -1,15 +0,0 @@ -builddir = @BUILDDIR@ -testname = @TPKG_NAME@ -LIBTOOL = $(builddir)/libtool - -CFLAGS=-Wall -Wextra -I$(builddir)/src -LDLIBS=$(builddir)/src/libgetdns.la - -.SUFFIXES: .c .o .a .lo .h - -.c.lo: - $(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) -c $< -o $@ - -$(testname): $(testname).lo - $(LIBTOOL) --tag=CC --mode=link $(CC) $(LDLIBS) $(LDFLAGS) -o $(testname) $(testname).lo - diff --git a/src/test/tpkg/285-out_of_filedescriptors.tpkg/285-out_of_filedescriptors.cmake b/src/test/tpkg/285-out_of_filedescriptors.tpkg/285-out_of_filedescriptors.cmake new file mode 100644 index 00000000..a649082e --- /dev/null +++ b/src/test/tpkg/285-out_of_filedescriptors.tpkg/285-out_of_filedescriptors.cmake @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 3.5) +project (@TPKG_NAME@) +add_executable(@TPKG_NAME@ @TPKG_NAME@.c) + +target_include_directories(@TPKG_NAME@ PRIVATE @BUILDDIR@) + +add_library(libgetdns SHARED IMPORTED ) +set_target_properties(libgetdns PROPERTIES IMPORTED_LOCATION @BUILDDIR@/libgetdns.so ) +target_link_libraries(@TPKG_NAME@ libgetdns) \ No newline at end of file diff --git a/src/test/tpkg/285-out_of_filedescriptors.tpkg/285-out_of_filedescriptors.test b/src/test/tpkg/285-out_of_filedescriptors.tpkg/285-out_of_filedescriptors.test index f6a832e4..09410e7d 100644 --- a/src/test/tpkg/285-out_of_filedescriptors.tpkg/285-out_of_filedescriptors.test +++ b/src/test/tpkg/285-out_of_filedescriptors.tpkg/285-out_of_filedescriptors.test @@ -27,7 +27,7 @@ echo "# queries: $NQUERIES" # which is smaller than 5 seconds default query timeout value, # so the test should succeed. -make && "${BUILDDIR}/build-stub-only/libtool" exec valgrind -v --log-file=valgrind.log --leak-check=full --error-exitcode=1 --track-origins=yes "./${TPKG_NAME}" ${LOCALHOST}| ( +cmake . && make && valgrind -v --log-file=valgrind.log --leak-check=full --error-exitcode=1 --track-origins=yes "./${TPKG_NAME}" ${LOCALHOST}| ( read PORT ulimit -n $QLIMIT ${GETDNS_STUB_QUERY} -s @${LOCALHOST}:$PORT TXT \