Commit 04fa5d74 authored by Tollef Fog Heen's avatar Tollef Fog Heen

Use automake's support for parallel tests

In current automake, there's no way to have the list of tests be
dynamic, so generate that when running configure as well as a local
hook to update the list if it's changed.

Also enable colourised test output.
parent 99d67512
# #
TESTS_PARALLELISM = 3 VTC_LOG_COMPILER = ./varnishtest -v -i
check: varnishtest TEST_EXTENSIONS = .vtc
./varnishtest -i -j$(TESTS_PARALLELISM) $(srcdir)/tests/*.vtc TESTS = @VTC_TESTS@
@echo "==================="
@echo "All tests succeeded" # Make sure we run check-local first
@echo "===================" check: check-local check-am
# See if list of checks have changed, recheck
check-local:
if [ "$$(cd $(srcdir) && echo tests/*.vtc)" != "@VTC_TESTS@" ]; then \
cd $(top_builddir) && ./config.status --recheck ; \
fi
DISTCLEANFILES = _.ok DISTCLEANFILES = _.ok
......
...@@ -12,7 +12,7 @@ OCFLAGS="$CFLAGS" ...@@ -12,7 +12,7 @@ OCFLAGS="$CFLAGS"
AC_CANONICAL_SYSTEM AC_CANONICAL_SYSTEM
AC_LANG(C) AC_LANG(C)
AM_INIT_AUTOMAKE([foreign]) AM_INIT_AUTOMAKE([foreign color-tests parallel-tests])
AC_DISABLE_STATIC AC_DISABLE_STATIC
AC_PROG_LIBTOOL AC_PROG_LIBTOOL
...@@ -526,6 +526,10 @@ fi ...@@ -526,6 +526,10 @@ fi
AC_DEFINE_UNQUOTED([VCC_CC],"$VCC_CC",[C compiler command line for VCL code]) AC_DEFINE_UNQUOTED([VCC_CC],"$VCC_CC",[C compiler command line for VCL code])
# Stupid automake needs this
VTC_TESTS="$(cd $srcdir/bin/varnishtest && echo tests/*.vtc)"
AC_SUBST(VTC_TESTS)
# Generate output # Generate output
AC_CONFIG_FILES([ AC_CONFIG_FILES([
Makefile Makefile
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment