diff options
author | Diadlo <polsha3@gmail.com> | 2017-11-15 12:48:48 +0300 |
---|---|---|
committer | Diadlo <polsha3@gmail.com> | 2017-11-15 15:22:19 +0300 |
commit | b39cc55d374457f66606096904af9fe7ea6562f6 (patch) | |
tree | bdfdbf57bd6b6e757e156b6dad4ab6c6eeb8823d /other/travis/toxcore-script | |
parent | d037f938111c148c6956b58ebfba717e7c7cfb00 (diff) |
Add support of IPv6 disabling
Diffstat (limited to 'other/travis/toxcore-script')
-rwxr-xr-x | other/travis/toxcore-script | 13 |
1 files changed, 13 insertions, 0 deletions
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 |
23 | done | 23 | done |
24 | 24 | ||
25 | if 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 | ||
32 | else | ||
33 | USE_IPV6=no | ||
34 | fi | ||
35 | |||
36 | |||
25 | # Build toxcore and run tests. | 37 | # Build toxcore and run tests. |
26 | RUN $CMAKE \ | 38 | RUN $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 | ||
37 | export CTEST_OUTPUT_ON_FAILURE=1 | 50 | export CTEST_OUTPUT_ON_FAILURE=1 |