Changeset 26081ce in mod_gnutls


Ignore:
Timestamp:
Jul 8, 2015, 3:29:58 PM (4 years ago)
Author:
Thomas Klute <thomas2.klute@…>
Branches:
debian/master, debian/stretch-backports, jessie-backports, master, upstream
Children:
4038c7a
Parents:
90a31a4
git-author:
Thomas Klute <thomas2.klute@…> (07/08/15 15:03:54)
git-committer:
Thomas Klute <thomas2.klute@…> (07/08/15 15:29:58)
Message:

Test suite: Make TEST_HOST and TEST_IP configurable through ./configure

The default settings in the test suite assume that "localhost" resolves
to the IPv6 loopback address. Depending on the local system
configuration this may be incorrect, so allow the user to pass their own
TEST_HOST and TEST_IP to ./configure, e.g. to use IPv4:

TEST_HOST="localhost" TEST_IP="127.0.0.1" ./configure

Note that changing TEST_HOST requires rebuilding the certificates, just
run "make mostlyclean" before the next test run.

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • configure.ac

    r90a31a4 r26081ce  
    109109AC_SUBST(MODULE_LIBS)
    110110
     111# assign default values to TEST_HOST and TEST_IP if necessary
     112: ${TEST_HOST:="localhost"}
     113: ${TEST_IP:="[::1]"}
     114AC_ARG_VAR([TEST_HOST], [Host name to use for server instances started by \
     115                        "make check", must resolve to TEST_IP. The default \
     116                        is "localhost".])
     117AC_ARG_VAR([TEST_IP], [IP address to use for server instances started by \
     118                      "make check". The default is the IPv6 loopback address \
     119                      [::1].])
     120
    111121AC_CONFIG_FILES([Makefile src/Makefile test/Makefile test/tests/Makefile \
    112122                          doc/Makefile include/mod_gnutls.h])
  • test/Makefile.am

    r90a31a4 r26081ce  
    7575# certificate generation. It is ignored for setup.done itself.
    7676server/crl.pem server/softhsm.db setup.done: setup.done
    77         srcdir=$(srcdir) $(MAKE) -f $(srcdir)/TestMakefile $(AM_MAKEFLAGS) $@
     77        TEST_HOST="$(TEST_HOST)" TEST_IP="$(TEST_IP)" srcdir=$(srcdir) \
     78        $(MAKE) -f $(srcdir)/TestMakefile $(AM_MAKEFLAGS) $@
    7879
    7980apache_data = base_apache.conf cgi_module.conf data/* mime.types proxy_mods.conf
     
    8485
    8586AM_TESTS_ENVIRONMENT = export APACHE2=$(APACHE2); \
    86         export AP_LIBEXECDIR=$(AP_LIBEXECDIR);
     87        export AP_LIBEXECDIR=$(AP_LIBEXECDIR); \
     88        export TEST_HOST="$(TEST_HOST)"; \
     89        export TEST_IP="$(TEST_IP)"; \
     90        export BACKEND_HOST="$(TEST_HOST)"; \
     91        export BACKEND_IP="$(TEST_IP)";
  • test/README

    r90a31a4 r26081ce  
    22==================================
    33
    4 Initial Author: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
     4Authors: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
     5         Thomas Klute <thomas2.klute@uni-dortmund.de>
    56
    67There are a lot of ways that a TLS-capable web server can go wrong.  I
     
    2425test and don't want to wait for the full test suite to run.
    2526
     27The default configuration assumes that an IPv6 loopback device is
     28available (TEST_IP=[::1]) and that TEST_HOST="localhost" resolves to
     29the IPv6 loopback address [::1]. If this does not apply to your
     30system, you can pass different values to ./configure, e.g. to use IPv4
     31instead:
     32
     33  TEST_HOST="localhost" TEST_IP="127.0.0.1" ./configure
    2634
    2735Adding a Test
     
    8189check" to adjust them):
    8290
    83  * they need a functioning loopback device and expect (by default) to
    84    have IPv6 functionality. [TEST_IP]
     91 * they need a functioning loopback device.
    8592
    86  * they expect (by default) the IPv6 loopback to have port 9932
     93 * they expect (by default) the TEST_IP to have port 9932
    8794   open. [TEST_PORT]
    8895
     
    9198   reasons. [TEST_QUERY_DELAY (seconds for the http request to be sent
    9299   and responded to)] and [TEST_GAP (seconds to wait between tests)]
    93 
    94  * they assume that the name "localhost" is associated with the IPv6
    95    loopback address [TEST_HOST]
Note: See TracChangeset for help on using the changeset viewer.