From: Amos Jeffries <> Date: Sun, 9 Apr 2017 11:05:48 +0000 (+1200) Subject: QA: allow test-suite to be run without a full build X-Git-Tag: M-staged-PR71~201 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2cf8ab2c2086917f2de4cd42e9340f433adaa2d5;p=thirdparty%2Fsquid.git QA: allow test-suite to be run without a full build 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. --- diff --git a/test-suite/Makefile.am b/test-suite/Makefile.am index df2fbca8ba..3c1e9ff6b6 100644 --- a/test-suite/Makefile.am +++ b/test-suite/Makefile.am @@ -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/%% ; \