]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
QA: allow test-suite to be run without a full build
authorAmos Jeffries <>
Sun, 9 Apr 2017 11:05:48 +0000 (23:05 +1200)
committerAmos Jeffries <>
Sun, 9 Apr 2017 11:05:48 +0000 (23:05 +1200)
The squid.conf processing tests have been assuming a full 'make check' was
run and generated a squid binary in the build directory.

This change allows callers to also run these tests on an arbitrary 'squid'
binary by using the command:
  make --eval="BIN_DIR=/path" -C test-suite squid-conf-tests

where /path is the path under which a squid binary already exists.

test-suite/Makefile.am

index df2fbca8ba31dd370de9f1e7965ec39ad07a3a14..3c1e9ff6b68b417c7e0c003565281c85b81aaf8d 100644 (file)
@@ -142,8 +142,9 @@ VirtualDeleteOperator_SOURCES = VirtualDeleteOperator.cc stub_libmem.cc $(DEBUG_
 
 squid-conf-tests: $(top_builddir)/src/squid.conf.default $(srcdir)/squidconf/*
        @failed=0; cfglist="$?"; rm -f $@ || $(TRUE); \
+       test "x$(BIN_DIR)" = "x" && BIN_DIR="$(top_builddir)/src/" || $(TRUE); \
        for cfg in $$cfglist ; do \
-               $(top_builddir)/src/squid -k parse -f $$cfg || \
+               $(BIN_DIR)/squid -k parse -f $$cfg || \
                        { echo "FAIL: squid.conf test: $$cfg" | \
                                sed s%$(top_builddir)/src/%% | \
                                sed s%$(srcdir)/squidconf/%% ; \