[libsoup] Drop Apache 2.2 support for tests



commit 5e5657c929c1a6146944c17c48c24af6ad90804d
Author: Dan Winship <danw gnome org>
Date:   Mon May 1 12:44:49 2017 -0400

    Drop Apache 2.2 support for tests

 configure.ac                              |   15 +--
 tests/Makefile.am                         |   31 +---
 tests/httpd.conf.22.in                    |  300 -----------------------------
 tests/{httpd.conf.24.in => httpd.conf.in} |    0
 tests/range-test.c                        |    4 -
 5 files changed, 3 insertions(+), 347 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 35b21d9..73744ec 100644
--- a/configure.ac
+++ b/configure.ac
@@ -209,13 +209,8 @@ if test "$APACHE_HTTPD" != "no"; then
     AC_MSG_CHECKING([Apache version])
     apache_version=`$APACHE_HTTPD -v 2>/dev/null | sed -ne 's/Server version: Apache\///p'`
     case $apache_version in
-    2.2.*)
-       AC_MSG_RESULT([$apache_version (ok)])
-       apache_version=2.2
-       ;;
     2.4.*)
        AC_MSG_RESULT([$apache_version (ok)])
-       apache_version=2.4
        ;;
     *)
        AC_MSG_RESULT([$apache_version (ignoring)])
@@ -261,18 +256,11 @@ fi
 
 if test "$APACHE_HTTPD" != "no" -a -n "$APACHE_MODULE_DIR" -a -n "$APACHE_SSL_MODULE_DIR"; then
     AC_DEFINE(HAVE_APACHE, 1, [Whether or not apache can be used for tests])
-    if test $apache_version = 2.2; then
-        AC_DEFINE(HAVE_APACHE_2_2, 1, [Apache is 2.2.x])
-    else
-        AC_DEFINE(HAVE_APACHE_2_4, 1, [Apache is 2.4.x])
-    fi
     have_apache=1
 else
     have_apache=0
 fi
 AM_CONDITIONAL(HAVE_APACHE, test "$have_apache" = 1)
-AM_CONDITIONAL(HAVE_APACHE_2_2, test "$have_apache" = 1 -a "$apache_version" = 2.2)
-AM_CONDITIONAL(HAVE_APACHE_2_4, test "$have_apache" = 1 -a "$apache_version" = 2.4)
 
 if test "$have_apache" = 1; then
     AC_CHECK_PROGS(PHP, php php5)
@@ -283,7 +271,7 @@ if test "$have_apache" = 1; then
        IF_HAVE_PHP=""
     else
        have_php=no
-       IF_HAVE_PHP="\#"
+       IF_HAVE_PHP="#"
     fi
     AC_MSG_RESULT($have_php)
     AC_SUBST(IF_HAVE_PHP)
@@ -425,6 +413,7 @@ AC_CONFIG_FILES([
        po/Makefile.in
        po/Makefile
        tests/Makefile
+       tests/httpd.conf
        examples/Makefile
        docs/Makefile
        docs/reference/Makefile
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 33f29df..81a72cb 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -67,22 +67,6 @@ libtest_la_SOURCES = \
 LDADD = libtest.la
 
 if HAVE_APACHE
-if HAVE_APACHE_2_2
-httpd_conf_in = httpd.conf.22.in
-else
-httpd_conf_in = httpd.conf.24.in
-endif
-httpd.conf: $(httpd_conf_in)
-       $(AM_V_GEN) sed -e 's,[@]srcdir@,$(srcdir),' \
-           -e 's,[@]builddir@,$(builddir),' \
-           -e 's,[@]APACHE_MODULE_DIR@,$(APACHE_MODULE_DIR),' \
-           -e 's,[@]APACHE_PHP_MODULE_DIR@,$(APACHE_PHP_MODULE_DIR),' \
-           -e 's,[@]APACHE_PHP_MODULE@,$(APACHE_PHP_MODULE),' \
-           -e 's,[@]IF_HAVE_PHP@,$(IF_HAVE_PHP),' \
-           -e 's,[@]APACHE_SSL_MODULE_DIR@,$(APACHE_SSL_MODULE_DIR),' \
-           $< > $@ || rm -f $@
-
-BUILT_SOURCES += httpd.conf
 test_data +=                   \
        htdigest                \
        htpasswd                \
@@ -97,8 +81,7 @@ soup-tests.gresource: soup-tests.gresource.xml $(RESOURCES)
 EXTRA_DIST +=                   \
        htdigest                 \
        htpasswd                 \
-       httpd.conf.22.in         \
-       httpd.conf.24.in         \
+       httpd.conf.in            \
        index.txt                \
        libsoup.supp             \
        soup-tests.gresource.xml \
@@ -119,21 +102,9 @@ check-local: check-TESTS
 .PHONY: start-httpd kill-httpd
 
 start-httpd:
-if HAVE_APACHE_2_2
-       @$(APACHE_HTTPD) -d $(abs_srcdir) -c "PidFile `pwd`/httpd.pid" -f `pwd`/httpd.conf -k start;
-endif
-if HAVE_APACHE_2_4
        @$(APACHE_HTTPD) -d $(abs_srcdir) -c "DefaultRuntimeDir `pwd`" -c "PidFile `pwd`/httpd.pid" -f 
`pwd`/httpd.conf -k start;
-endif
 
 kill-httpd:
-if HAVE_APACHE_2_2
-       @if [ -f httpd.pid ]; then \
-               $(APACHE_HTTPD) -d $(abs_srcdir) -c "PidFile `pwd`/httpd.pid" -f `pwd`/httpd.conf -k stop; \
-       fi
-endif
-if HAVE_APACHE_2_4
        @if [ -f httpd.pid ]; then \
                $(APACHE_HTTPD) -d $(abs_srcdir) -c "DefaultRuntimeDir `pwd`" -c "PidFile `pwd`/httpd.pid" -f 
`pwd`/httpd.conf -k stop; \
        fi
-endif
diff --git a/tests/httpd.conf.24.in b/tests/httpd.conf.in
similarity index 100%
rename from tests/httpd.conf.24.in
rename to tests/httpd.conf.in
diff --git a/tests/range-test.c b/tests/range-test.c
index 06cde77..d3c4996 100644
--- a/tests/range-test.c
+++ b/tests/range-test.c
@@ -334,11 +334,7 @@ do_apache_range_test (void)
 
        session = soup_test_session_new (SOUP_TYPE_SESSION_ASYNC, NULL);
 
-#if HAVE_APACHE_2_2
-       do_range_test (session, "http://127.0.0.1:47524/";, FALSE, FALSE);
-#else
        do_range_test (session, "http://127.0.0.1:47524/";, TRUE, FALSE);
-#endif
 
        soup_test_session_abort_unref (session);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]