summaryrefslogtreecommitdiff
path: root/other
diff options
context:
space:
mode:
Diffstat (limited to 'other')
-rw-r--r--other/travis/env-linux.sh10
-rw-r--r--other/travis/env-osx.sh7
-rw-r--r--other/travis/env-windows.sh2
-rw-r--r--other/travis/env.sh1
-rwxr-xr-xother/travis/toxcore-script2
5 files changed, 16 insertions, 6 deletions
diff --git a/other/travis/env-linux.sh b/other/travis/env-linux.sh
index 1782c229..68687a2b 100644
--- a/other/travis/env-linux.sh
+++ b/other/travis/env-linux.sh
@@ -11,8 +11,10 @@ RUN() {
11} 11}
12 12
13TESTS() { 13TESTS() {
14 # Keep running tests until they eventually succeed or Travis times out after 14 COUNT="$1"; shift
15 # 50 minutes. This cuts down on the time lost when tests fail, because we no 15 "$@" || {
16 # longer need to manually restart the build and wait for compilation. 16 if [ $COUNT -gt 1 ]; then
17 "$@" || TESTS "$@" 17 TESTS `expr $COUNT - 1` "$@"
18 fi
19 }
18} 20}
diff --git a/other/travis/env-osx.sh b/other/travis/env-osx.sh
index b68a8651..747df32d 100644
--- a/other/travis/env-osx.sh
+++ b/other/travis/env-osx.sh
@@ -10,5 +10,10 @@ RUN() {
10} 10}
11 11
12TESTS() { 12TESTS() {
13 "$@" 13 COUNT="$1"; shift
14 "$@" || {
15 if [ $COUNT -gt 1 ]; then
16 TESTS `expr $COUNT - 1` "$@"
17 fi
18 }
14} 19}
diff --git a/other/travis/env-windows.sh b/other/travis/env-windows.sh
index 410948c1..6f7f0914 100644
--- a/other/travis/env-windows.sh
+++ b/other/travis/env-windows.sh
@@ -11,6 +11,8 @@ RUN() {
11} 11}
12 12
13TESTS() { 13TESTS() {
14 shift # Ignore test run count.
15
14 # Download Microsoft DLLs. 16 # Download Microsoft DLLs.
15 curl http://www.dlldump.com/dllfiles/I/iphlpapi.dll -o _build/iphlpapi.dll 17 curl http://www.dlldump.com/dllfiles/I/iphlpapi.dll -o _build/iphlpapi.dll
16 curl http://www.dlldump.com/dllfiles/W/ws2_32.dll -o _build/ws2_32.dll 18 curl http://www.dlldump.com/dllfiles/W/ws2_32.dll -o _build/ws2_32.dll
diff --git a/other/travis/env.sh b/other/travis/env.sh
index 55ab30ca..4899ec25 100644
--- a/other/travis/env.sh
+++ b/other/travis/env.sh
@@ -10,6 +10,7 @@ export CFLAGS="-O3 -DTRAVIS_ENV=1"
10export CMAKE_EXTRA_FLAGS="-DERROR_ON_WARNING=ON -DBUILD_NTOX=ON" 10export CMAKE_EXTRA_FLAGS="-DERROR_ON_WARNING=ON -DBUILD_NTOX=ON"
11 11
12BUILD_DIR=_build 12BUILD_DIR=_build
13MAX_TEST_RETRIES=3
13 14
14# Workaround for broken Travis image. 15# Workaround for broken Travis image.
15export TERM=xterm 16export TERM=xterm
diff --git a/other/travis/toxcore-script b/other/travis/toxcore-script
index 3b8b5eb4..758d3430 100755
--- a/other/travis/toxcore-script
+++ b/other/travis/toxcore-script
@@ -38,5 +38,5 @@ export CTEST_OUTPUT_ON_FAILURE=1
38 38
39RUN make -C$BUILD_DIR -j$NPROC -k install 39RUN make -C$BUILD_DIR -j$NPROC -k install
40if $RUN_TESTS; then 40if $RUN_TESTS; then
41 TESTS make -C$BUILD_DIR -j$NPROC test ARGS="--rerun-failed" 41 TESTS $MAX_TEST_RETRIES make -C$BUILD_DIR -j$NPROC test ARGS="--rerun-failed"
42fi 42fi