* configure.in, Makefile.in: Handle no-test-suite case through

check-no rule.  Only regenerate the test suite on repeated
  "make check" run if a header file has changed.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1833122 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Joe Orton
2018-06-07 13:17:27 +00:00
parent 7711d39400
commit c2f9d44ea9
2 changed files with 21 additions and 9 deletions

View File

@ -430,17 +430,27 @@ check/build/config_vars.mk: build/config_vars.out
echo "sbindir = $(top_builddir)/check/bin" >> $@ echo "sbindir = $(top_builddir)/check/bin" >> $@
echo "bindir = $(top_builddir)/check/bin" >> $@ echo "bindir = $(top_builddir)/check/bin" >> $@
# Run the Apache::Test suite if it has been configured with --with-test-suite. # Generate config & modules etc from scratch any time a header file is
check: check-include check-dirs check-conf check/build/config_vars.mk check-binaries # touched, so e.g. we don't get MMN mismatch against the modules built
@if test "x$(TEST_SUITE_LOCATION)" = "xno"; then \ # in .../c-modules.
echo 'Re-run configure with the --with-test-suite option to enable in-tree tests.'; \ $(TEST_SUITE_LOCATION)/Makefile: $(TEST_SUITE_LOCATION)/Makefile.PL $(INSTALL_HEADERS)
false; \
fi
cd "$(TEST_SUITE_LOCATION)" && \ cd "$(TEST_SUITE_LOCATION)" && \
perl Makefile.PL -apxs "$(top_builddir)/check/bin/apxs" && \ perl Makefile.PL -apxs "$(top_builddir)/check/bin/apxs" && \
./t/TEST -clean && \ ./t/TEST -clean && \
./t/TEST -config && \ ./t/TEST -config
./t/TEST $(TESTS)
check-make: $(TEST_SUITE_LOCATION)/Makefile
check-no:
@echo 'Re-run configure with the --with-test-suite option to enable in-tree tests.'
@false
check-yes: check-include check-dirs check-conf check/build/config_vars.mk \
check-binaries $(TEST_SUITE_LOCATION)/Makefile
cd $(TEST_SUITE_LOCATION) && ./t/TEST $(TESTS)
# Run the Apache::Test suite if it has been configured with --with-test-suite.
check: check-$(WITH_TEST_SUITE)
# #
# Unit Test Suite # Unit Test Suite

View File

@ -923,12 +923,14 @@ AC_ARG_WITH([test-suite],
else else
test -f "$withval/Makefile.PL" || AC_MSG_ERROR([--with-test-suite directory $withval does not contain the expected Makefile.PL]) test -f "$withval/Makefile.PL" || AC_MSG_ERROR([--with-test-suite directory $withval does not contain the expected Makefile.PL])
TEST_SUITE_LOCATION="$withval" TEST_SUITE_LOCATION="$withval"
WITH_TEST_SUITE=yes
fi fi
], ],
[ TEST_SUITE_LOCATION="no" ] [ WITH_TEST_SUITE=no ]
) )
APACHE_SUBST(TEST_SUITE_LOCATION) APACHE_SUBST(TEST_SUITE_LOCATION)
APACHE_SUBST(WITH_TEST_SUITE)
APACHE_FAST_OUTPUT(Makefile modules/Makefile srclib/Makefile) APACHE_FAST_OUTPUT(Makefile modules/Makefile srclib/Makefile)
APACHE_FAST_OUTPUT(os/Makefile server/Makefile) APACHE_FAST_OUTPUT(os/Makefile server/Makefile)