mirror of https://github.com/getdnsapi/getdns.git
Get all of the tests run by ‘run-all.sh’ working apart from those that require valgrind…….
update stubby commit and ymlx commit to remove build warnings
This commit is contained in:
parent
cafd745383
commit
ffbc49cc2d
|
@ -1,6 +1,7 @@
|
||||||
*~
|
*~
|
||||||
.DS_Store
|
.DS_Store
|
||||||
build/
|
build*/
|
||||||
|
tests*/
|
||||||
getdns*.tar.gz
|
getdns*.tar.gz
|
||||||
*.o
|
*.o
|
||||||
*.so
|
*.so
|
||||||
|
|
|
@ -116,9 +116,9 @@ option(BUILD_GETDNS_QUERY "Compile and install the getdns_query tool." ON)
|
||||||
option(BUILD_GETDNS_SERVER_MON "Compile and install the getdns_server_mon tool." ON)
|
option(BUILD_GETDNS_SERVER_MON "Compile and install the getdns_server_mon tool." ON)
|
||||||
option(BUILD_STUBBY "Compile and install stubby, the (stub) resolver daemon." OFF)
|
option(BUILD_STUBBY "Compile and install stubby, the (stub) resolver daemon." OFF)
|
||||||
|
|
||||||
option(USE_LIBEV "Use libev if available." ON)
|
option(USE_LIBEV "Use libev if available." OFF)
|
||||||
option(USE_LIBEVENT2 "Use libevent2 if available." ON)
|
option(USE_LIBEVENT2 "Use libevent2 if available." OFF)
|
||||||
option(USE_LIBUV "Use libuv if available." ON)
|
option(USE_LIBUV "Use libuv if available." OFF)
|
||||||
option(USE_LIBIDN "Use libidn if available." ON)
|
option(USE_LIBIDN "Use libidn if available." ON)
|
||||||
option(USE_LIBIDN2 "Use libidn2 if available." ON)
|
option(USE_LIBIDN2 "Use libidn2 if available." ON)
|
||||||
option(USE_GNUTLS "Use GnuTLS for TLS connections." OFF)
|
option(USE_GNUTLS "Use GnuTLS for TLS connections." OFF)
|
||||||
|
@ -188,7 +188,7 @@ if (MSVC)
|
||||||
# So full on warnings are not appropriate.
|
# So full on warnings are not appropriate.
|
||||||
add_compile_options(/W2)
|
add_compile_options(/W2)
|
||||||
else ()
|
else ()
|
||||||
add_compile_options(-Wall -Wextra)
|
add_compile_options(-Wall -Wextra -Wpedantic)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
# Windows. Uh-oh.
|
# Windows. Uh-oh.
|
||||||
|
@ -737,8 +737,7 @@ if (USE_LIBEV)
|
||||||
endif ()
|
endif ()
|
||||||
endif ()
|
endif ()
|
||||||
else ()
|
else ()
|
||||||
message(WARNING "Libev not found, libev extension not built.")
|
message(FATAL_ERROR "Libev required but not found.")
|
||||||
set(USE_LIBEV OFF)
|
|
||||||
endif ()
|
endif ()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
@ -785,8 +784,7 @@ if (USE_LIBEVENT2)
|
||||||
endif ()
|
endif ()
|
||||||
endif ()
|
endif ()
|
||||||
else ()
|
else ()
|
||||||
message(WARNING "Libevent2 not found, libevent extension not built.")
|
message(FATAL_ERROR "Libevent2 required but not found.")
|
||||||
set(USE_LIBEVENT2 OFF)
|
|
||||||
endif ()
|
endif ()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
@ -828,8 +826,7 @@ if (USE_LIBUV)
|
||||||
endif ()
|
endif ()
|
||||||
endif ()
|
endif ()
|
||||||
else ()
|
else ()
|
||||||
message(WARNING "Libuv not found, libuv extension not built.")
|
message(FATAL_ERROR "Libuv required but not found.")
|
||||||
set(USE_LIBUV OFF)
|
|
||||||
endif ()
|
endif ()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,6 @@ CmdDepends:
|
||||||
Depends:
|
Depends:
|
||||||
Help:
|
Help:
|
||||||
Pre: 100-compile.pre
|
Pre: 100-compile.pre
|
||||||
Post: 100-compile.post
|
|
||||||
Test: 100-compile.test
|
Test: 100-compile.test
|
||||||
AuxFiles:
|
AuxFiles:
|
||||||
Passed:
|
Passed:
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
# #-- 100-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" "${SRCROOT}/${f}"
|
|
||||||
done
|
|
||||||
|
|
|
@ -13,16 +13,8 @@ fi
|
||||||
# use .tpkg.var.test for in test variable passing
|
# use .tpkg.var.test for in test variable passing
|
||||||
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
[ -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" && \
|
|
||||||
echo "$f" >> restore-srcdir-configure-settings
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
rm -fr "${BUILDDIR}/build"
|
rm -fr "${BUILDDIR}/build"
|
||||||
mkdir "${BUILDDIR}/build"
|
mkdir "${BUILDDIR}/build"
|
||||||
cd "${BUILDDIR}/build"
|
cd "${BUILDDIR}/build"
|
||||||
"${SRCROOT}/configure" $* --prefix "${BUILDDIR}/install"
|
rm -f CMakeCache.txt
|
||||||
|
cmake -DCMAKE_INSTALL_PREFIX=../install $* ${SRCROOT}
|
||||||
|
|
|
@ -5,4 +5,4 @@
|
||||||
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
||||||
|
|
||||||
cd "${BUILDDIR}/build"
|
cd "${BUILDDIR}/build"
|
||||||
make XTRA_CFLAGS='-g -Werror' -j 4
|
make XTRA_CFLAGS='-g -WError' -j 4
|
||||||
|
|
|
@ -6,5 +6,5 @@
|
||||||
|
|
||||||
cd "${BUILDDIR}/build"
|
cd "${BUILDDIR}/build"
|
||||||
make -j 4 install \
|
make -j 4 install \
|
||||||
&& echo "export GETDNS_QUERY=\"${BUILDDIR}/build/src/tools/getdns_query\"" \
|
&& echo "export GETDNS_QUERY=\"${BUILDDIR}/build/getdns_query\"" \
|
||||||
>> ../.tpkg.var.master
|
>> ../.tpkg.var.master
|
||||||
|
|
|
@ -9,7 +9,6 @@ CmdDepends:
|
||||||
Depends:
|
Depends:
|
||||||
Help:
|
Help:
|
||||||
Pre: 200-stub-only-compile-install.pre
|
Pre: 200-stub-only-compile-install.pre
|
||||||
Post: 200-stub-only-compile-install.post
|
|
||||||
Test: 200-stub-only-compile-install.test
|
Test: 200-stub-only-compile-install.test
|
||||||
AuxFiles:
|
AuxFiles:
|
||||||
Passed:
|
Passed:
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
# #-- 200-stub-only-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-stub-only" "${SRCROOT}/${f}"
|
|
||||||
done
|
|
||||||
|
|
|
@ -13,16 +13,8 @@ fi
|
||||||
# use .tpkg.var.test for in test variable passing
|
# use .tpkg.var.test for in test variable passing
|
||||||
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
[ -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-stub-only" && \
|
|
||||||
echo "$f" >> restore-srcdir-configure-settings
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
rm -fr "${BUILDDIR}/build-stub-only"
|
rm -fr "${BUILDDIR}/build-stub-only"
|
||||||
mkdir "${BUILDDIR}/build-stub-only"
|
mkdir "${BUILDDIR}/build-stub-only"
|
||||||
cd "${BUILDDIR}/build-stub-only"
|
cd "${BUILDDIR}/build-stub-only"
|
||||||
"${SRCROOT}/configure" $* --prefix "${BUILDDIR}/install-stub-only" --enable-stub-only --enable-debug-server --enable-debug-anchor
|
rm -f CMakeCache.txt
|
||||||
|
cmake -DENABLE_STUB_ONLY=ON -DENABLE_DEBUG_SERVER=ON -DENABLE_DEBUG_ANCHOR=ON -DCMAKE_INSTALL_PREFIX=../install-stub-only $* ${SRCROOT}
|
||||||
|
|
|
@ -5,6 +5,6 @@
|
||||||
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
||||||
|
|
||||||
cd "${BUILDDIR}/build-stub-only"
|
cd "${BUILDDIR}/build-stub-only"
|
||||||
make XTRA_CFLAGS='-g -Werror' -j 4 install \
|
make XTRA_CFLAGS='-g -WError' -j 4 install \
|
||||||
&& echo "export GETDNS_STUB_QUERY=\"${BUILDDIR}/build-stub-only/src/tools/getdns_query\"" \
|
&& echo "export GETDNS_STUB_QUERY=\"${BUILDDIR}/build-stub-only/getdns_query\"" \
|
||||||
>> ../.tpkg.var.master
|
>> ../.tpkg.var.master
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
builddir = @BUILDDIR@
|
|
||||||
testname = @TPKG_NAME@
|
|
||||||
LIBTOOL = $(builddir)/libtool
|
|
||||||
|
|
||||||
CFLAGS=-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
|
|
||||||
|
|
|
@ -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.dylib )
|
||||||
|
target_link_libraries(@TPKG_NAME@ libgetdns)
|
|
@ -5,10 +5,7 @@
|
||||||
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
[ -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'`
|
BUILDDIR4SED=`echo "${BUILDDIR}/build-stub-only" | sed 's/\//\\\\\//g'`
|
||||||
sed -e "s/@BUILDDIR@/${BUILDDIR4SED}/g" \
|
sed -e "s/@BUILDDIR@/${BUILDDIR4SED}/g" \
|
||||||
-e "s/@TPKG_NAME@/${TPKG_NAME}/g" "${TPKG_NAME}.Makefile"
|
-e "s/@TPKG_NAME@/${TPKG_NAME}/g" "${TPKG_NAME}.cmake"
|
||||||
) > Makefile
|
) > CMakeLists.txt
|
||||||
|
|
|
@ -4,4 +4,4 @@
|
||||||
# use .tpkg.var.test for in test variable passing
|
# use .tpkg.var.test for in test variable passing
|
||||||
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
||||||
|
|
||||||
make && "./${TPKG_NAME}" | tee out && diff out "${TPKG_NAME}.good"
|
cmake . && make && "./${TPKG_NAME}" | tee out && diff out "${TPKG_NAME}.good"
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
builddir = @BUILDDIR@
|
|
||||||
testname = @TPKG_NAME@
|
|
||||||
LIBTOOL = $(builddir)/libtool
|
|
||||||
|
|
||||||
CFLAGS=-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
|
|
||||||
|
|
|
@ -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.dylib )
|
||||||
|
target_link_libraries(@TPKG_NAME@ libgetdns)
|
|
@ -5,10 +5,7 @@
|
||||||
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
||||||
|
|
||||||
(
|
(
|
||||||
grep '^CC=' "${BUILDDIR}/build-stub-only/src/Makefile"
|
BUILDDIR4SED=`echo "${BUILDDIR}/build-with-stubby" | sed 's/\//\\\\\//g'`
|
||||||
grep '^LDFLAGS=' "${BUILDDIR}/build-stub-only/src/Makefile"
|
|
||||||
|
|
||||||
BUILDDIR4SED=`echo "${BUILDDIR}/build-stub-only" | sed 's/\//\\\\\//g'`
|
|
||||||
sed -e "s/@BUILDDIR@/${BUILDDIR4SED}/g" \
|
sed -e "s/@BUILDDIR@/${BUILDDIR4SED}/g" \
|
||||||
-e "s/@TPKG_NAME@/${TPKG_NAME}/g" "${TPKG_NAME}.Makefile"
|
-e "s/@TPKG_NAME@/${TPKG_NAME}/g" "${TPKG_NAME}.cmake"
|
||||||
) > Makefile
|
) > CMakeLists.txt
|
||||||
|
|
|
@ -4,4 +4,4 @@
|
||||||
# use .tpkg.var.test for in test variable passing
|
# use .tpkg.var.test for in test variable passing
|
||||||
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
||||||
|
|
||||||
make && "./${TPKG_NAME}" 255-yaml-config.input | tee out && diff out "${TPKG_NAME}.good"
|
cmake . && make && "./${TPKG_NAME}" 255-yaml-config.input | tee out && diff out "${TPKG_NAME}.good"
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
builddir = @BUILDDIR@
|
|
||||||
testname = @TPKG_NAME@
|
|
||||||
LIBTOOL = $(builddir)/libtool
|
|
||||||
|
|
||||||
CFLAGS=-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
|
|
||||||
|
|
|
@ -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.dylib )
|
||||||
|
target_link_libraries(@TPKG_NAME@ libgetdns)
|
|
@ -5,10 +5,7 @@
|
||||||
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
[ -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'`
|
BUILDDIR4SED=`echo "${BUILDDIR}/build-stub-only" | sed 's/\//\\\\\//g'`
|
||||||
sed -e "s/@BUILDDIR@/${BUILDDIR4SED}/g" \
|
sed -e "s/@BUILDDIR@/${BUILDDIR4SED}/g" \
|
||||||
-e "s/@TPKG_NAME@/${TPKG_NAME}/g" "${TPKG_NAME}.Makefile"
|
-e "s/@TPKG_NAME@/${TPKG_NAME}/g" "${TPKG_NAME}.cmake"
|
||||||
) > Makefile
|
) > CMakeLists.txt
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
# use .tpkg.var.test for in test variable passing
|
# use .tpkg.var.test for in test variable passing
|
||||||
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
||||||
|
|
||||||
if ! make
|
if ! (cmake . && make)
|
||||||
then
|
then
|
||||||
exit 1
|
exit 1
|
||||||
elif ! ( "./${TPKG_NAME}" "${TPKG_NAME}.net-dns.org" | tee out )
|
elif ! ( "./${TPKG_NAME}" "${TPKG_NAME}.net-dns.org" | tee out )
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
builddir = @BUILDDIR@
|
|
||||||
testname = @TPKG_NAME@
|
|
||||||
LIBTOOL = $(builddir)/libtool
|
|
||||||
|
|
||||||
CFLAGS=-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
|
|
||||||
|
|
|
@ -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.dylib )
|
||||||
|
target_link_libraries(@TPKG_NAME@ libgetdns)
|
|
@ -5,10 +5,7 @@
|
||||||
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
[ -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'`
|
BUILDDIR4SED=`echo "${BUILDDIR}/build-stub-only" | sed 's/\//\\\\\//g'`
|
||||||
sed -e "s/@BUILDDIR@/${BUILDDIR4SED}/g" \
|
sed -e "s/@BUILDDIR@/${BUILDDIR4SED}/g" \
|
||||||
-e "s/@TPKG_NAME@/${TPKG_NAME}/g" "${TPKG_NAME}.Makefile"
|
-e "s/@TPKG_NAME@/${TPKG_NAME}/g" "${TPKG_NAME}.cmake"
|
||||||
) > Makefile
|
) > CMakeLists.txt
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
# use .tpkg.var.test for in test variable passing
|
# use .tpkg.var.test for in test variable passing
|
||||||
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
||||||
|
|
||||||
if ! make
|
if ! (cmake . && make)
|
||||||
then
|
then
|
||||||
exit 1
|
exit 1
|
||||||
elif ! ( "./${TPKG_NAME}" "${TPKG_NAME}.net-dns.org" | tee out )
|
elif ! ( "./${TPKG_NAME}" "${TPKG_NAME}.net-dns.org" | tee out )
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
builddir = @BUILDDIR@
|
|
||||||
testname = @TPKG_NAME@
|
|
||||||
LIBTOOL = $(builddir)/libtool
|
|
||||||
|
|
||||||
CFLAGS=-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
|
|
||||||
|
|
|
@ -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.dylib )
|
||||||
|
target_link_libraries(@TPKG_NAME@ libgetdns)
|
|
@ -5,10 +5,7 @@
|
||||||
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
[ -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'`
|
BUILDDIR4SED=`echo "${BUILDDIR}/build-stub-only" | sed 's/\//\\\\\//g'`
|
||||||
sed -e "s/@BUILDDIR@/${BUILDDIR4SED}/g" \
|
sed -e "s/@BUILDDIR@/${BUILDDIR4SED}/g" \
|
||||||
-e "s/@TPKG_NAME@/${TPKG_NAME}/g" "${TPKG_NAME}.Makefile"
|
-e "s/@TPKG_NAME@/${TPKG_NAME}/g" "${TPKG_NAME}.cmake"
|
||||||
) > Makefile
|
) > CMakeLists.txt
|
||||||
|
|
|
@ -4,4 +4,4 @@
|
||||||
# use .tpkg.var.test for in test variable passing
|
# use .tpkg.var.test for in test variable passing
|
||||||
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
||||||
|
|
||||||
make && "./${TPKG_NAME}" | tee out && diff out "${TPKG_NAME}.good"
|
cmake . && make && "./${TPKG_NAME}" | tee out && diff out "${TPKG_NAME}.good"
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
builddir = @BUILDDIR@
|
|
||||||
testname = @TPKG_NAME@
|
|
||||||
LIBTOOL = $(builddir)/libtool
|
|
||||||
|
|
||||||
CFLAGS=-Wall -Wextra -I$(builddir)/src -g
|
|
||||||
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
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f $(testname).lo $(testname).o $(testname)
|
|
|
@ -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.dylib )
|
||||||
|
target_link_libraries(@TPKG_NAME@ libgetdns)
|
|
@ -5,10 +5,7 @@
|
||||||
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
[ -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'`
|
BUILDDIR4SED=`echo "${BUILDDIR}/build-stub-only" | sed 's/\//\\\\\//g'`
|
||||||
sed -e "s/@BUILDDIR@/${BUILDDIR4SED}/g" \
|
sed -e "s/@BUILDDIR@/${BUILDDIR4SED}/g" \
|
||||||
-e "s/@TPKG_NAME@/${TPKG_NAME}/g" "${TPKG_NAME}.Makefile"
|
-e "s/@TPKG_NAME@/${TPKG_NAME}/g" "${TPKG_NAME}.cmake"
|
||||||
) > Makefile
|
) > CMakeLists.txt
|
||||||
|
|
|
@ -9,7 +9,7 @@ LOCALHOST=`${GETDNS_STUB_QUERY} '{namespaces:[GETDNS_NAMESPACE_LOCALNAMES]}' -A
|
||||||
| sed -e 's/^[^"]*"//g' -e 's/"[^"]*$//g'`
|
| sed -e 's/^[^"]*"//g' -e 's/"[^"]*$//g'`
|
||||||
echo "localhost: $LOCALHOST"
|
echo "localhost: $LOCALHOST"
|
||||||
|
|
||||||
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 && "${BUILDDIR}/build-stub-only/libtool" exec valgrind -v --log-file=valgrind.log --leak-check=full --error-exitcode=1 --track-origins=yes "./${TPKG_NAME}" ${LOCALHOST} | (
|
||||||
read PORT
|
read PORT
|
||||||
read PORT2
|
read PORT2
|
||||||
|
|
||||||
|
|
|
@ -7,10 +7,10 @@
|
||||||
rm -fr "${BUILDDIR}/build-event-loops"
|
rm -fr "${BUILDDIR}/build-event-loops"
|
||||||
mkdir "${BUILDDIR}/build-event-loops"
|
mkdir "${BUILDDIR}/build-event-loops"
|
||||||
cd "${BUILDDIR}/build-event-loops"
|
cd "${BUILDDIR}/build-event-loops"
|
||||||
"${SRCROOT}/configure" $* --prefix "${BUILDDIR}/install" --enable-all-drafts --with-stubby --with-libevent --with-libev --with-libuv \
|
(rm CMakeCache.txt & cmake -DENABLE_DRAFT_MDNS_SUPPORT=ON -DBUILD_STUBBY=ON -DCMAKE_INSTALL_PREFIX=../install-stub-only -DUSE_LIBEVENT2=ON -DUSE_LIBEV=ON -DUSE_LIBUV=ON $* ${SRCROOT}) || \
|
||||||
|| "${SRCROOT}/configure" $* --prefix "${BUILDDIR}/install" --enable-all-drafts --with-stubby --with-libevent --with-libev \
|
(rm CMakeCache.txt & cmake -DENABLE_DRAFT_MDNS_SUPPORT=ON -DBUILD_STUBBY=ON -DCMAKE_INSTALL_PREFIX=../install-stub-only -DUSE_LIBEVENT2=ON -DUSE_LIBEV=ON $* ${SRCROOT}) || \
|
||||||
|| "${SRCROOT}/configure" $* --prefix "${BUILDDIR}/install" --enable-all-drafts --with-stubby --with-libevent --with-libuv \
|
(rm CMakeCache.txt & cmake -DENABLE_DRAFT_MDNS_SUPPORT=ON -DBUILD_STUBBY=ON -DCMAKE_INSTALL_PREFIX=../install-stub-only -DUSE_LIBEVENT2=ON -DUSE_LIBUV=ON $* ${SRCROOT}) || \
|
||||||
|| "${SRCROOT}/configure" $* --prefix "${BUILDDIR}/install" --enable-all-drafts --with-stubby --with-libev --with-libuv \
|
(rm CMakeCache.txt & cmake -DENABLE_DRAFT_MDNS_SUPPORT=ON -DBUILD_STUBBY=ON -DCMAKE_INSTALL_PREFIX=../install-stub-only -DUSE_LIBEV=ON -DUSE_LIBUV=ON $* ${SRCROOT}) || \
|
||||||
|| "${SRCROOT}/configure" $* --prefix "${BUILDDIR}/install" --enable-all-drafts --with-stubby --with-libevent \
|
(rm CMakeCache.txt & cmake -DENABLE_DRAFT_MDNS_SUPPORT=ON -DBUILD_STUBBY=ON -DCMAKE_INSTALL_PREFIX=../install-stub-only -DUSE_LIBEVENT2=ON $* ${SRCROOT}) || \
|
||||||
|| "${SRCROOT}/configure" $* --prefix "${BUILDDIR}/install" --enable-all-drafts --with-stubby --with-libev \
|
(rm CMakeCache.txt & cmake -DENABLE_DRAFT_MDNS_SUPPORT=ON -DBUILD_STUBBY=ON -DCMAKE_INSTALL_PREFIX=../install-stub-only -DUSE_LIBEV=ON $* ${SRCROOT}) || \
|
||||||
|| "${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-stub-only -DUSE_LIBUV=ON $* ${SRCROOT})
|
||||||
|
|
|
@ -4,6 +4,12 @@
|
||||||
# use .tpkg.var.test for in test variable passing
|
# use .tpkg.var.test for in test variable passing
|
||||||
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
||||||
|
|
||||||
|
if test "`hostname`" != "bonobo"
|
||||||
|
then
|
||||||
|
echo Sorry, running dependency test on bonobo only
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
export TPKG_HERE=`pwd`
|
export TPKG_HERE=`pwd`
|
||||||
# Temporarily copy Makefile.in files
|
# Temporarily copy Makefile.in files
|
||||||
find . -type f -name "Makefile.in" -print0 | xargs -0 rm -f && (
|
find . -type f -name "Makefile.in" -print0 | xargs -0 rm -f && (
|
||||||
|
@ -15,11 +21,6 @@ find . -type f -name "Makefile.in" -print0 | xargs -0 rm -f && (
|
||||||
)
|
)
|
||||||
(
|
(
|
||||||
cd "${BUILDDIR}/build-event-loops"
|
cd "${BUILDDIR}/build-event-loops"
|
||||||
if test "`hostname`" != "bonobo"
|
|
||||||
then
|
|
||||||
echo Sorry, running dependency test on bonobo only
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
if ! ./config.status --config | grep -q 'enable-all-drafts.*--with-libevent.*--with-libev.*--with-libuv'
|
if ! ./config.status --config | grep -q 'enable-all-drafts.*--with-libevent.*--with-libev.*--with-libuv'
|
||||||
then
|
then
|
||||||
echo Skipping because not covering enough code
|
echo Skipping because not covering enough code
|
||||||
|
|
|
@ -8,8 +8,8 @@ Component:
|
||||||
CmdDepends:
|
CmdDepends:
|
||||||
Depends: 310-dependencies.tpkg
|
Depends: 310-dependencies.tpkg
|
||||||
Help:
|
Help:
|
||||||
Pre: 320-event-loops-compile.pre
|
Pre:
|
||||||
Post: 320-event-loops-compile.post
|
Post:
|
||||||
Test: 320-event-loops-compile.test
|
Test: 320-event-loops-compile.test
|
||||||
AuxFiles:
|
AuxFiles:
|
||||||
Passed:
|
Passed:
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
# #-- 320-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
|
|
||||||
|
|
|
@ -1,24 +0,0 @@
|
||||||
# #-- 320-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
|
|
|
@ -5,20 +5,12 @@ export SRCROOT=`(cd "${SRCDIR}/../../.."; pwd)`
|
||||||
export TPKG="${SRCDIR}/tpkg"
|
export TPKG="${SRCDIR}/tpkg"
|
||||||
export BUILDDIR=`pwd`
|
export BUILDDIR=`pwd`
|
||||||
export BUILDROOT=`(cd "${BUILDDIR}/../../.."; pwd)`
|
export BUILDROOT=`(cd "${BUILDDIR}/../../.."; pwd)`
|
||||||
export LIBTOOL="${BUILDROOT}/libtool"
|
|
||||||
|
|
||||||
if [ ! -f "${SRCROOT}/src/test/jsmn/jsmn.c" ]
|
if [ ! -f "${SRCROOT}/src/test/jsmn/jsmn.c" ]
|
||||||
then
|
then
|
||||||
(cd "${SRCROOT}"; git submodule update --init)
|
(cd "${SRCROOT}"; git submodule update --init)
|
||||||
fi
|
fi
|
||||||
if [ ! -f "${SRCROOT}/libtool" ]
|
|
||||||
then
|
|
||||||
(cd "${SRCROOT}"; (glibtoolize -fic || libtoolize -fic))
|
|
||||||
fi
|
|
||||||
if [ ! -f "${SRCROOT}/configure" ]
|
|
||||||
then
|
|
||||||
(cd "${SRCROOT}"; autoreconf -fi)
|
|
||||||
fi
|
|
||||||
if [ -f .tpkg.var.master ]
|
if [ -f .tpkg.var.master ]
|
||||||
then
|
then
|
||||||
cat .tpkg.var.master \
|
cat .tpkg.var.master \
|
||||||
|
@ -33,7 +25,8 @@ export SRCROOT="${SRCROOT}"
|
||||||
export BUILDDIR="${BUILDDIR}"
|
export BUILDDIR="${BUILDDIR}"
|
||||||
export BUILDROOT="${BUILDROOT}"
|
export BUILDROOT="${BUILDROOT}"
|
||||||
export TPKG="${TPKG}"
|
export TPKG="${TPKG}"
|
||||||
export LIBTOOL="${LIBTOOL}"
|
|
||||||
END_OF_TPKG_VAR_MASTER
|
END_OF_TPKG_VAR_MASTER
|
||||||
|
|
||||||
|
# This line disables running of this test. Need to add a build-with-stubby test
|
||||||
|
# and then re-enable this.
|
||||||
${TPKG} f 255-yaml-config.tpkg
|
${TPKG} f 255-yaml-config.tpkg
|
||||||
|
|
|
@ -460,6 +460,7 @@ lruhash_clear(struct lruhash* table)
|
||||||
void
|
void
|
||||||
lruhash_status(struct lruhash* table, const char* id, int extended)
|
lruhash_status(struct lruhash* table, const char* id, int extended)
|
||||||
{
|
{
|
||||||
|
(void)id;
|
||||||
lock_quick_lock(&table->lock);
|
lock_quick_lock(&table->lock);
|
||||||
log_info("%s: %u entries, memory %u / %u",
|
log_info("%s: %u entries, memory %u / %u",
|
||||||
id, (unsigned)table->num, (unsigned)table->space_used,
|
id, (unsigned)table->num, (unsigned)table->space_used,
|
||||||
|
|
Loading…
Reference in New Issue