Changeset cf4e708 in mod_gnutls for configure.ac


Ignore:
Timestamp:
Jan 23, 2016, 5:11:43 PM (4 years ago)
Author:
Thomas Klute <thomas2.klute@…>
Branches:
debian/master, debian/stretch-backports, jessie-backports, master, upstream
Children:
ddf6027
Parents:
bca7629
Message:

Run tests in separate network namespaces

Creating a network namespace for each test avoids port conflicts so
Apache instances can run in parallel, and also isolates the tests from
the host system.

Test namespaces are automatically used if the "unshare" command is
available, and can be disabled by passing "--disable-test-namespaces"
to ./configure.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • configure.ac

    rbca7629 rcf4e708  
    7171fi
    7272AM_CONDITIONAL([DISABLE_FLOCK], [test "$enable_flock" = "no"])
     73
     74dnl Enable test namespaces? Default is "yes".
     75AC_ARG_ENABLE(test-namespaces,
     76        AS_HELP_STRING([--disable-test-namespaces], [Disable use of network \
     77        namespaces to run tests in parallel (some architectures might not \
     78        support it)]),
     79        [use_netns=$enableval], [use_netns=yes])
     80dnl If namespaces are enabled, make sure "unshare" is available
     81if test "$enable_test_namespaces" != "no"; then
     82        AC_PATH_PROG([UNSHARE], [unshare], [no])
     83        use_netns=${UNSHARE}
     84        # default mutex breaks in namespace, use "pthread" instead
     85        MUTEX_TYPE="pthread"
     86        PID_AFFIX="-\${TEST_NAME}"
     87else
     88        MUTEX_TYPE="default"
     89        PID_AFFIX=""
     90fi
     91AM_CONDITIONAL([ENABLE_NETNS], [test "$use_netns" != "no"])
     92AC_SUBST(MUTEX_TYPE)
     93AC_SUBST(PID_AFFIX)
     94AM_SUBST_NOTMAKE(MUTEX_TYPE)
     95AM_SUBST_NOTMAKE(PID_AFFIX)
    7396
    7497AC_ARG_ENABLE(msva,
     
    152175
    153176AC_CONFIG_FILES([Makefile src/Makefile test/Makefile test/tests/Makefile \
    154                           doc/Makefile include/mod_gnutls.h test/listen.conf])
     177                          doc/Makefile include/mod_gnutls.h test/listen.conf \
     178                          test/apache-conf/netns.conf])
    155179AC_OUTPUT
    156180
Note: See TracChangeset for help on using the changeset viewer.