mirror of https://github.com/getdnsapi/getdns.git
Start work on remaining tests
This commit is contained in:
parent
1cca550799
commit
d59380fca0
|
@ -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
|
||||
|
|
|
@ -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)
|
|
@ -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
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
@ -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)
|
|
@ -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
|
|
@ -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" \
|
||||
|
|
|
@ -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
|
||||
|
|
@ -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)
|
|
@ -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 \
|
||||
|
|
Loading…
Reference in New Issue