Don't configure before running tests

+ run tests in a separate directory
This commit is contained in:
Willem Toorop 2015-12-10 15:32:29 +01:00
parent 45d12a9f0b
commit 2675554f6a
7 changed files with 10 additions and 17 deletions

View File

@ -4,9 +4,10 @@ compiler:
- clang
before_script:
- sudo apt-get update
- sudo apt-get install libunbound-dev libldns-dev libidn11-dev check libevent-dev libev-dev
- sudo apt-get install libunbound-dev libldns-dev libidn11-dev check libevent-dev libev-dev bc
script:
- libtoolize -fic
- autoreconf -fi
- ./configure
- make tpkg
- mkdir tests
- cd tests
- sh src/test/tpkg/run-tpkg-tests.sh

View File

@ -94,9 +94,6 @@ doc: FORCE
example:
cd spec/example && $(MAKE) $@
tpkg:
cd src && $(MAKE) $@
test:
cd src && $(MAKE) $@

View File

@ -878,7 +878,7 @@ AC_SUBST(GETDNS_QUERY)
AC_SUBST(INSTALL_GETDNS_QUERY)
AC_SUBST(UNINSTALL_GETDNS_QUERY)
AC_CONFIG_FILES([Makefile src/Makefile src/version.c src/getdns/getdns.h src/getdns/getdns_extra.h spec/example/Makefile src/test/Makefile src/test/tpkg/run-tpkg-tests.sh doc/Makefile getdns.pc])
AC_CONFIG_FILES([Makefile src/Makefile src/version.c src/getdns/getdns.h src/getdns/getdns_extra.h spec/example/Makefile src/test/Makefile doc/Makefile getdns.pc])
if [ test -n "$DOXYGEN" ]
then AC_CONFIG_FILES([src/Doxyfile])
fi

View File

@ -148,9 +148,6 @@ libgetdns.la: $(GETDNS_OBJ) version.lo context.lo libmini_event.lo $(GLDNS_OBJ)
$(LIBTOOL) --tag=CC --mode=link $(CC) $(CFLAGS) -o $@ $(GETDNS_OBJ) version.lo context.lo libmini_event.lo $(GLDNS_OBJ) $(COMPAT_OBJ) $(UTIL_OBJ) $(LDFLAGS) -rpath $(libdir) -version-info $(libversion) -no-undefined -export-symbols $(srcdir)/libgetdns.symbols
tpkg:
cd test && $(MAKE) $@
test: all
cd test && $(MAKE) $@

View File

@ -92,11 +92,6 @@ default: all
all: $(PROGRAMS)
tpkg: run-tpkg-tests
run-tpkg-tests:
cd tpkg && sh run-tpkg-tests.sh
$(ALL_OBJS):
$(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) $(LDNS_CFLAGS) -c $(srcdir)/$(@:.lo=.c) -o $@

View File

@ -1,6 +1,6 @@
#!/bin/sh
export SRCDIR=`(cd "@srcdir@"; pwd)`
export SRCDIR=`dirname $0`
export SRCROOT=`(cd "${SRCDIR}/../../.."; pwd)`
export TPKG="${SRCDIR}/tpkg"
export BUILDDIR=`pwd`

View File

@ -319,8 +319,11 @@ function report() {
if [[ $passed -lt $TPKG_PASS ]]; then
exit 1
fi
fi
elif [[ $failed -gt 0 ]]; then
exit 1
else
exit 0
fi
}
# clone test1 to test2