]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Automated squid.conf parser testing with squid -k parse
authorAmos Jeffries <squid3@treenet.co.nz>
Sat, 28 Sep 2013 09:01:23 +0000 (03:01 -0600)
committerAmos Jeffries <squid3@treenet.co.nz>
Sat, 28 Sep 2013 09:01:23 +0000 (03:01 -0600)
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
test-suite/squidconf/empty [new file with mode: 0644]

index fa486c876797f0bb21c58c382355dd4adc8e183b..a917a61564317b04ec8afbe09aa8ebd747639632 100644 (file)
@@ -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 (file)
index 0000000..e69de29