Skip to content
Permalink
Browse files

Extract the VTC "make check" logic to vtc.am

The effect is currently the same, but for VMODs we shouldn't need a
complete configure step.

Refs #3184
  • Loading branch information
Dridi committed Feb 13, 2020
1 parent 4eeec97 commit 182e96ff73925dea016195832e31443cbf4992ed
Showing with 25 additions and 11 deletions.
  1. +4 −11 bin/varnishtest/Makefile.am
  2. +21 −0 vtc.am
@@ -1,18 +1,11 @@
#

VTC_LOG_COMPILER = ./varnishtest -v -i
TEST_EXTENSIONS = .vtc
TESTS = @VTC_TESTS@

# Make sure we run check-local first
check-am: check-local
# See if list of checks have changed, recheck
check-local:
@mkdir -p tests ; \
LC_ALL=C; \
if [ "$$(cd $(srcdir) && echo tests/*.vtc)" != "@VTC_TESTS@" ]; then \
cd $(top_builddir) && ./config.status --recheck ; \
fi
vtc-refresh-tests:
@cd $(top_builddir) && ./config.status --recheck

include $(top_srcdir)/vtc.am

DISTCLEANFILES = _.ok

21 vtc.am
@@ -0,0 +1,21 @@
# This file helps set up a varnishtest execution without a traditional
# pre-defined list of tests. Test cases are expected to be located in a
# tests/ directory relative to the Makefile's source directory.
#
# When a difference is detected, a refresh is triggered by calling the
# vtc-refresh-tests target that must be defined in the including Makefile.
#
# The current assumption is that all the tests for the Makefile are VTCs
# and may be revisited if needed.

VTC_LOG_COMPILER = $(top_builddir)/bin/varnishtest/varnishtest -v -i
TEST_EXTENSIONS = .vtc

check-am: vtc-check-tests

vtc-check-tests:
@mkdir -p tests \
LC_ALL=C; \
if [ "$$(cd $(srcdir) && echo tests/*.vtc)" != "$(TESTS)" ]; then \
$(MAKE) $(AM_MAKEFLAGS) vtc-refresh-tests ; \
fi

0 comments on commit 182e96f

Please sign in to comment.
You can’t perform that action at this time.