summaryrefslogtreecommitdiff
path: root/other
diff options
context:
space:
mode:
Diffstat (limited to 'other')
-rwxr-xr-xother/travis/autotools-script12
-rwxr-xr-xother/travis/toxcore-script13
2 files changed, 25 insertions, 0 deletions
diff --git a/other/travis/autotools-script b/other/travis/autotools-script
index d97b15b3..d47dc717 100755
--- a/other/travis/autotools-script
+++ b/other/travis/autotools-script
@@ -1,5 +1,16 @@
1#!/bin/sh 1#!/bin/sh
2 2
3if perl -e '
4 use Socket qw(PF_INET6 SOCK_STREAM pack_sockaddr_in6 IN6ADDR_LOOPBACK);
5
6 socket(S, PF_INET6, SOCK_STREAM, 0) || exit 1;
7 bind(S, pack_sockaddr_in6(0, IN6ADDR_LOOPBACK)) || exit 1;
8'; then
9 IPV6_FLAG="--enable-ipv6"
10else
11 IPV6_FLAG="--disable-ipv6"
12fi
13
3# Build toxcore with some custom flags here. Note that this does *not* run the 14# Build toxcore with some custom flags here. Note that this does *not* run the
4# tests, so any flags passed here are irrelevant to testing. This only checks 15# tests, so any flags passed here are irrelevant to testing. This only checks
5# that we can build toxcore with the specified flags. Tests run with default 16# that we can build toxcore with the specified flags. Tests run with default
@@ -12,6 +23,7 @@
12 --enable-daemon \ 23 --enable-daemon \
13 --enable-logging \ 24 --enable-logging \
14 --enable-ntox \ 25 --enable-ntox \
26 $IPV6_FLAG \
15 --with-log-level=TRACE 27 --with-log-level=TRACE
16 28
17# We use make instead of RUN $MAKE here, because the autotools build will only 29# We use make instead of RUN $MAKE here, because the autotools build will only
diff --git a/other/travis/toxcore-script b/other/travis/toxcore-script
index 4f5a58ea..df1462de 100755
--- a/other/travis/toxcore-script
+++ b/other/travis/toxcore-script
@@ -22,6 +22,18 @@ for i in `seq 0 7`; do
22 RUN rm -rf $BUILD_DIR 22 RUN rm -rf $BUILD_DIR
23done 23done
24 24
25if perl -e '
26 use Socket qw(PF_INET6 SOCK_STREAM pack_sockaddr_in6 IN6ADDR_LOOPBACK);
27
28 socket(S, PF_INET6, SOCK_STREAM, 0) || exit 1;
29 bind(S, pack_sockaddr_in6(0, IN6ADDR_LOOPBACK)) || exit 1;
30'; then
31 USE_IPV6=yes
32else
33 USE_IPV6=no
34fi
35
36
25# Build toxcore and run tests. 37# Build toxcore and run tests.
26RUN $CMAKE \ 38RUN $CMAKE \
27 -B$BUILD_DIR \ 39 -B$BUILD_DIR \
@@ -32,6 +44,7 @@ RUN $CMAKE \
32 -DSTRICT_ABI=ON \ 44 -DSTRICT_ABI=ON \
33 -DTEST_TIMEOUT_SECONDS=120 \ 45 -DTEST_TIMEOUT_SECONDS=120 \
34 -DTRACE=ON \ 46 -DTRACE=ON \
47 -DUSE_IPV6=$USE_IPV6 \
35 $CMAKE_EXTRA_FLAGS 48 $CMAKE_EXTRA_FLAGS
36 49
37export CTEST_OUTPUT_ON_FAILURE=1 50export CTEST_OUTPUT_ON_FAILURE=1