[master] 0d1838161 build: Manage the VMOD test suite like the main one

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Thu Jan 7 14:16:07 UTC 2021


commit 0d18381615a7f78c5ef1f342bd1bd0e98eb9db77
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Tue Jan 5 18:34:10 2021 +0100

    build: Manage the VMOD test suite like the main one
    
    We no longer need a special per-VMOD case since we now have one unified
    VMOD test suite.

diff --git a/bin/varnishtest/Makefile.am b/bin/varnishtest/Makefile.am
index 2dd014f26..75f84cb56 100644
--- a/bin/varnishtest/Makefile.am
+++ b/bin/varnishtest/Makefile.am
@@ -2,9 +2,6 @@
 
 TESTS = @VTC_TESTS@
 
-vtc-refresh-tests:
-	@cd $(top_builddir) && ./config.status --recheck
-
 include $(top_srcdir)/vtc.am
 
 DISTCLEANFILES = _.ok
diff --git a/configure.ac b/configure.ac
index 5c7c9dd7e..e44b61fff 100644
--- a/configure.ac
+++ b/configure.ac
@@ -842,6 +842,10 @@ VTC_TESTS="$(cd $srcdir/bin/varnishtest && echo tests/*.vtc)"
 AC_SUBST(VTC_TESTS)
 AM_SUBST_NOTMAKE(VTC_TESTS)
 
+VMOD_TESTS="$(cd $srcdir/vmod && echo tests/*.vtc)"
+AC_SUBST(VMOD_TESTS)
+AM_SUBST_NOTMAKE(VMOD_TESTS)
+
 VSC_SRC="$(cd $srcdir/bin/varnishd && echo *.vsc)"
 VSC_GEN_C="$(echo $VSC_SRC | sed 's:\.vsc:.c:g')"
 VSC_GEN_H="$(echo $VSC_SRC | sed 's:\.vsc:.h:g')"
diff --git a/vmod/Makefile.am b/vmod/Makefile.am
index 8241e183d..8bf96c96e 100644
--- a/vmod/Makefile.am
+++ b/vmod/Makefile.am
@@ -1,5 +1,9 @@
 #
 
+TESTS = @VMOD_TESTS@
+
+include $(top_srcdir)/vtc.am
+
 AM_LDFLAGS  = $(AM_LT_LDFLAGS)
 
 AM_CPPFLAGS = \
@@ -81,7 +85,7 @@ libvmod_vtc_la_SOURCES = \
 #
 
 vmod_LTLIBRARIES =
-EXTRA_DIST = $(libvmod_debug_extra_sources)
+EXTRA_DIST = $(libvmod_debug_extra_sources) $(TESTS)
 CLEANFILES = $(libvmod_debug_built_sources)
 BUILT_SOURCES = $(libvmod_debug_built_sources)
 
@@ -110,33 +114,3 @@ vmod_debug_symbols_regex = 'Vmod_.*_Data'
 
 # not --strict
 vmodtoolargs_debug = --boilerplate -o vcc_debug_if
-
-#
-# Manage the vmod test suite
-#
-
-TESTS = \
-	tests/cookie_b00000.vtc \
-	tests/cookie_b00001.vtc \
-	tests/cookie_b00002.vtc \
-	tests/cookie_b00003.vtc \
-	tests/cookie_b00004.vtc \
-	tests/cookie_b00005.vtc \
-	tests/cookie_b00006.vtc \
-	tests/cookie_b00007.vtc \
-	tests/cookie_b00008.vtc \
-	tests/cookie_b00009.vtc \
-	tests/cookie_b00010.vtc \
-	tests/cookie_b00011.vtc \
-	tests/cookie_b00012.vtc \
-	tests/cookie_b00013.vtc \
-	tests/cookie_r00028.vtc \
-	tests/cookie_v00000.vtc \
-	tests/std_b00001.vtc
-
-EXTRA_DIST += $(TESTS)
-
-vtc-refresh-tests:
-	@cd $(top_builddir) && ./config.status --file=$(subdir)/Makefile
-
-include $(top_srcdir)/vtc.am
diff --git a/vtc.am b/vtc.am
index 840687a43..f67a4969c 100644
--- a/vtc.am
+++ b/vtc.am
@@ -17,5 +17,5 @@ vtc-check-tests:
 	@mkdir -p tests ; \
 	LC_ALL=C; \
 	if [ "$$(cd $(srcdir) && echo tests/*.vtc)" != "$(TESTS)" ]; then \
-		$(MAKE) $(AM_MAKEFLAGS) vtc-refresh-tests ; \
+		cd $(top_builddir) && ./config.status --recheck ; \
 	fi


More information about the varnish-commit mailing list