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
check: varnishtest
./varnishtest -i -j$(TESTS_PARALLELISM) $(srcdir)/tests/*.vtc
@echo "==================="
@echo "All tests succeeded"
@echo "==================="
VTC_LOG_COMPILER = ./varnishtest -v -i
TEST_EXTENSIONS = .vtc
TESTS = @VTC_TESTS@
# Make sure we run check-local first
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
......
......@@ -12,7 +12,7 @@ OCFLAGS="$CFLAGS"
AC_CANONICAL_SYSTEM
AC_LANG(C)
AM_INIT_AUTOMAKE([foreign])
AM_INIT_AUTOMAKE([foreign color-tests parallel-tests])
AC_DISABLE_STATIC
AC_PROG_LIBTOOL
......@@ -526,6 +526,10 @@ fi
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
AC_CONFIG_FILES([
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