httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jchamp...@apache.org
Subject svn commit: r1777384 - in /httpd/httpd/branches/trunk-test-integration: Makefile.in configure.in
Date Wed, 04 Jan 2017 23:14:28 GMT
Author: jchampion
Date: Wed Jan  4 23:14:27 2017
New Revision: 1777384

URL: http://svn.apache.org/viewvc?rev=1777384&view=rev
Log:
Add a --with-test-suite option for "in-tree" testing

Step one. It's not actually "in-tree" yet, since it requires running
`make install` first, but at least it gives us a `make check`.

Modified:
    httpd/httpd/branches/trunk-test-integration/Makefile.in
    httpd/httpd/branches/trunk-test-integration/configure.in

Modified: httpd/httpd/branches/trunk-test-integration/Makefile.in
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/trunk-test-integration/Makefile.in?rev=1777384&r1=1777383&r2=1777384&view=diff
==============================================================================
--- httpd/httpd/branches/trunk-test-integration/Makefile.in (original)
+++ httpd/httpd/branches/trunk-test-integration/Makefile.in Wed Jan  4 23:14:27 2017
@@ -295,5 +295,24 @@ update-log-tags update-log-msg-tags:
 	find server modules os -name \*.c|xargs perl \
 		docs/log-message-tags/update-log-msg-tags
 
+# TODO: don't require an install of the server binaries to run the tests
+APXS_LOCATION := $(DESTDIR)$(bindir)/apxs
+
+check:
+	@if test "x$(TEST_SUITE_LOCATION)" = "xno"; then \
+	    echo 'Re-run configure with the --with-test-suite option to enable in-tree tests.';
\
+	    false; \
+	fi
+	@if ! test -f "$(APXS_LOCATION)"; then \
+	    echo "Can't find apxs at '$(APXS_LOCATION)'"; \
+	    echo "Unfortunately the 'in-tree' tests don't run yet without first running 'make install'.
Sorry."; \
+	    false; \
+	fi
+	cd "$(TEST_SUITE_LOCATION)" && \
+	    perl Makefile.PL -apxs "$(APXS_LOCATION)" && \
+	    ./t/TEST -clean && \
+	    ./t/TEST -config && \
+	    ./t/TEST
+
 # XXX: This looks awfully platform-specific [read: bad form and style]
 include $(top_srcdir)/os/os2/core.mk

Modified: httpd/httpd/branches/trunk-test-integration/configure.in
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/trunk-test-integration/configure.in?rev=1777384&r1=1777383&r2=1777384&view=diff
==============================================================================
--- httpd/httpd/branches/trunk-test-integration/configure.in (original)
+++ httpd/httpd/branches/trunk-test-integration/configure.in Wed Jan  4 23:14:27 2017
@@ -886,6 +886,21 @@ AC_ARG_ENABLE(bsd-makefiles,APACHE_HELP_
   FORCE_BSD_MAKEFILE="auto"
 ])
 
+AC_ARG_WITH([test-suite],
+    APACHE_HELP_STRING([--with-test-suite=PATH], [enable in-tree 'make check' with the given
Apache::Test suite location]),
+    [
+        if test "x$withval" = "xyes"; then
+            AC_MSG_ERROR([option --with-test-suite requires a directory]);
+        else
+            test -f "$withval/Makefile.PL" || AC_MSG_WARN([--with-test-suite directory $withval
does not appear to contain the expected Makefile.PL])
+            TEST_SUITE_LOCATION="$withval"
+        fi
+    ],
+    [ TEST_SUITE_LOCATION="no" ]
+)
+
+APACHE_SUBST(TEST_SUITE_LOCATION)
+
 APACHE_FAST_OUTPUT(Makefile modules/Makefile srclib/Makefile) 
 APACHE_FAST_OUTPUT(os/Makefile server/Makefile)
 APACHE_FAST_OUTPUT(support/Makefile)



Mime
View raw message