From 9b2c99ced33a7c35891ae916fec77f18d81ddb44 Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Sat, 28 Sep 2013 03:01:23 -0600 Subject: [PATCH] Automated squid.conf parser testing with squid -k parse This make the build process testing run 'squid -k parse' with a series of test configuration files to exercise edge cases and backward compatibility. The default squid.conf which is to be installed on new systems is always tested. Other config files with unit tests can be dropped into test-suite/squidconf/ and will be parse tested automatically. --- test-suite/Makefile.am | 9 ++++++++- test-suite/squidconf/empty | 0 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 test-suite/squidconf/empty diff --git a/test-suite/Makefile.am b/test-suite/Makefile.am index fa486c8767..a917a61564 100644 --- a/test-suite/Makefile.am +++ b/test-suite/Makefile.am @@ -34,7 +34,8 @@ TESTS += debug \ MemPoolTest\ mem_node_test\ mem_hdr_test\ - $(ESI_TESTS) + $(ESI_TESTS) \ + squid-conf-tests ## Sort by alpha - any build failures are significant. check_PROGRAMS += debug \ @@ -111,3 +112,9 @@ VirtualDeleteOperator_SOURCES = VirtualDeleteOperator.cc $(DEBUG_SOURCE) ## ##$(TARGLIB): $(LIBOBJS) ## $(AR_R) $(TARGLIB) $(LIBOBJS) + +squid-conf-tests: + ../src/squid -k parse -f ../src/squid.conf.default || exit 1 + for t in `ls -1 $(srcdir)/squidconf/*`; do + ../src/squid -k parse -f $t || exit 1 + done diff --git a/test-suite/squidconf/empty b/test-suite/squidconf/empty new file mode 100644 index 0000000000..e69de29bb2 -- 2.47.2