summaryrefslogtreecommitdiffstats
path: root/test/travis_run_linux.sh
blob: 90ac2c81389944d3dd4582cc3920443d38f6c308 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/bash -ex
### Installed apr/apr-util don't include the *.m4 files but the
### Debian packages helpfully install them, so use the system APR to buildconf
./buildconf --with-apr=/usr/bin/apr-1-config ${BUILDCONFIG}
# For trunk, "make check" is sufficient to run the test suite.
# For 2.4.x, the test suite must be run manually
if test ! -v SKIP_TESTING; then
    CONFIG="$CONFIG --enable-load-all-modules"
    if grep -q ^check: Makefile.in; then
        CONFIG="--with-test-suite=test/perl-framework $CONFIG"
        WITH_TEST_SUITE=1
    else
        CONFIG="--prefix=$HOME/build/httpd-root $CONFIG"
    fi
fi
if test -v APR_VERSION; then
    CONFIG="$CONFIG --with-apr=$HOME/root/apr-${APR_VERSION}"
else
    CONFIG="$CONFIG --with-apr=/usr"
fi
if test -v APU_VERSION; then
    CONFIG="$CONFIG --with-apr-util=$HOME/root/apr-util-${APU_VERSION}"
else
    CONFIG="$CONFIG --with-apr-util=/usr"
fi
./configure $CONFIG
make $MFLAGS
if ! test -v SKIP_TESTING; then
    if test -v WITH_TEST_SUITE; then
        make check TESTS="${TEST_ARGS}"
    else
        make install
        pushd test/perl-framework
            perl Makefile.PL -apxs $HOME/build/httpd-root/bin/apxs
            make test APACHE_TEST_EXTRA_ARGS="${TEST_ARGS}"
        popd
    fi
    if test -v LITMUS; then
        pushd test/perl-framework
           mkdir -p t/htdocs/modules/dav
           ./t/TEST -start
           litmus http://localhost:8529/modules/dav/
           ./t/TEST -stop
        popd
    fi
fi