diff options
author | iphydf <iphydf@users.noreply.github.com> | 2016-08-24 23:52:34 +0100 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2016-09-16 11:22:23 +0100 |
commit | 37c041f8159f7e89f2585243e9b8073f47d77fd1 (patch) | |
tree | ed1f983a231f5bf7d2c24ce994feb55ee4953cda | |
parent | c0d84ab48977f6ea80e8b5f7eca04423d4a31d26 (diff) |
Clean up Travis build a bit in preparation for osx/win.
-rw-r--r-- | .travis.yml | 6 | ||||
-rw-r--r-- | auto_tests/tox_test.c | 9 | ||||
-rwxr-xr-x | other/travis/autotools-after_script | 4 | ||||
l--------- | other/travis/autotools-install | 1 | ||||
-rw-r--r-- | other/travis/autotools-linux-install | 3 | ||||
-rwxr-xr-x | other/travis/autotools-script | 6 | ||||
-rw-r--r-- | other/travis/env-linux.sh | 9 | ||||
-rw-r--r-- | other/travis/env.sh | 1 | ||||
-rwxr-xr-x | other/travis/hstox-after_script | 4 | ||||
-rwxr-xr-x | other/travis/hstox-install | 3 | ||||
-rwxr-xr-x | other/travis/hstox-script | 3 | ||||
-rwxr-xr-x | other/travis/toxcore-after_script | 14 | ||||
-rwxr-xr-x | other/travis/toxcore-linux-after_script | 8 | ||||
-rwxr-xr-x | other/travis/toxcore-linux-install (renamed from other/travis/toxcore-install) | 3 | ||||
-rwxr-xr-x | other/travis/toxcore-script | 15 |
15 files changed, 35 insertions, 54 deletions
diff --git a/.travis.yml b/.travis.yml index 2f22d495..cfa9240d 100644 --- a/.travis.yml +++ b/.travis.yml | |||
@@ -5,11 +5,9 @@ matrix: | |||
5 | - env: JOB=hstox ENV=linux | 5 | - env: JOB=hstox ENV=linux |
6 | language: haskell | 6 | language: haskell |
7 | ghc: 7.8 | 7 | ghc: 7.8 |
8 | - env: JOB=toxcore ENV=linux | ||
9 | compiler: clang | ||
10 | - env: JOB=toxcore ENV=linux | ||
11 | compiler: gcc | ||
12 | - env: JOB=autotools ENV=linux | 8 | - env: JOB=autotools ENV=linux |
9 | compiler: gcc | ||
10 | - env: JOB=toxcore ENV=linux | ||
13 | compiler: clang | 11 | compiler: clang |
14 | 12 | ||
15 | addons: | 13 | addons: |
diff --git a/auto_tests/tox_test.c b/auto_tests/tox_test.c index 219550db..69e6033d 100644 --- a/auto_tests/tox_test.c +++ b/auto_tests/tox_test.c | |||
@@ -923,7 +923,7 @@ loop_top: | |||
923 | } | 923 | } |
924 | 924 | ||
925 | if (counter != last_count) { | 925 | if (counter != last_count) { |
926 | printf("got to %u\n", counter); | 926 | printf("many_clients got to %u\n", counter); |
927 | last_count = counter; | 927 | last_count = counter; |
928 | } | 928 | } |
929 | 929 | ||
@@ -1115,6 +1115,8 @@ loop_top: | |||
1115 | ck_assert_msg(num != UINT32_MAX && test == TOX_ERR_FRIEND_ADD_OK, "Failed to add friend error code: %i", test); | 1115 | ck_assert_msg(num != UINT32_MAX && test == TOX_ERR_FRIEND_ADD_OK, "Failed to add friend error code: %i", test); |
1116 | } | 1116 | } |
1117 | 1117 | ||
1118 | uint16_t last_count = 0; | ||
1119 | |||
1118 | while (1) { | 1120 | while (1) { |
1119 | uint16_t counter = 0; | 1121 | uint16_t counter = 0; |
1120 | 1122 | ||
@@ -1126,6 +1128,11 @@ loop_top: | |||
1126 | } | 1128 | } |
1127 | } | 1129 | } |
1128 | 1130 | ||
1131 | if (counter != last_count) { | ||
1132 | printf("many_clients_tcp_b got to %u\n", counter); | ||
1133 | last_count = counter; | ||
1134 | } | ||
1135 | |||
1129 | if (counter == NUM_FRIENDS * 2) { | 1136 | if (counter == NUM_FRIENDS * 2) { |
1130 | break; | 1137 | break; |
1131 | } | 1138 | } |
diff --git a/other/travis/autotools-after_script b/other/travis/autotools-after_script deleted file mode 100755 index 7c5055b7..00000000 --- a/other/travis/autotools-after_script +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | set -e -u -x | ||
4 | . other/travis/env-$ENV.sh | ||
diff --git a/other/travis/autotools-install b/other/travis/autotools-install deleted file mode 120000 index 7174a278..00000000 --- a/other/travis/autotools-install +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | toxcore-install \ No newline at end of file | ||
diff --git a/other/travis/autotools-linux-install b/other/travis/autotools-linux-install new file mode 100644 index 00000000..edc6a2dc --- /dev/null +++ b/other/travis/autotools-linux-install | |||
@@ -0,0 +1,3 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | . other/travis/toxcore-linux-install | ||
diff --git a/other/travis/autotools-script b/other/travis/autotools-script index 5448aac5..cc536ab9 100755 --- a/other/travis/autotools-script +++ b/other/travis/autotools-script | |||
@@ -1,8 +1,5 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | ||
3 | set -e -u -x | ||
4 | . other/travis/env-$ENV.sh | ||
5 | |||
6 | # Build toxcore and run tests. | 3 | # Build toxcore and run tests. |
7 | ./autogen.sh | 4 | ./autogen.sh |
8 | ./configure \ | 5 | ./configure \ |
@@ -10,8 +7,7 @@ set -e -u -x | |||
10 | --with-libsodium-headers=$CACHE_DIR/include \ | 7 | --with-libsodium-headers=$CACHE_DIR/include \ |
11 | --enable-daemon \ | 8 | --enable-daemon \ |
12 | --enable-logging \ | 9 | --enable-logging \ |
13 | --enable-ntox \ | 10 | --enable-ntox |
14 | CFLAGS="-DTRAVIS_ENV=1" | ||
15 | 11 | ||
16 | # We use make instead of RUN $MAKE here, because the autotools build will only | 12 | # We use make instead of RUN $MAKE here, because the autotools build will only |
17 | # ever run natively on the Linux container, never on a Windows cross compilation | 13 | # ever run natively on the Linux container, never on a Windows cross compilation |
diff --git a/other/travis/env-linux.sh b/other/travis/env-linux.sh index 085f94e6..0eb5e9ea 100644 --- a/other/travis/env-linux.sh +++ b/other/travis/env-linux.sh | |||
@@ -1,11 +1,10 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | ||
3 | . other/travis/env.sh | 3 | CMAKE=cmake |
4 | NPROC=`nproc` | ||
5 | CURDIR=$PWD | ||
6 | TESTS=true | ||
4 | 7 | ||
5 | RUN() { | 8 | RUN() { |
6 | "$@" | 9 | "$@" |
7 | } | 10 | } |
8 | export CMAKE=cmake | ||
9 | export MAKE=make | ||
10 | export PREFIX=$PWD/_install | ||
11 | export NPROC=`nproc` | ||
diff --git a/other/travis/env.sh b/other/travis/env.sh index cd188ceb..78ce0010 100644 --- a/other/travis/env.sh +++ b/other/travis/env.sh | |||
@@ -6,5 +6,6 @@ export OPAMROOT=$CACHE_DIR/.opam | |||
6 | export LD_LIBRARY_PATH=$CACHE_DIR/lib | 6 | export LD_LIBRARY_PATH=$CACHE_DIR/lib |
7 | export PKG_CONFIG_PATH=$CACHE_DIR/lib/pkgconfig | 7 | export PKG_CONFIG_PATH=$CACHE_DIR/lib/pkgconfig |
8 | export ASTYLE=$CACHE_DIR/astyle/build/gcc/bin/astyle | 8 | export ASTYLE=$CACHE_DIR/astyle/build/gcc/bin/astyle |
9 | export CFLAGS="-O3 -DTRAVIS_ENV=1" | ||
9 | 10 | ||
10 | BUILD_DIR=_build | 11 | BUILD_DIR=_build |
diff --git a/other/travis/hstox-after_script b/other/travis/hstox-after_script deleted file mode 100755 index 7c5055b7..00000000 --- a/other/travis/hstox-after_script +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | set -e -u -x | ||
4 | . other/travis/env-$ENV.sh | ||
diff --git a/other/travis/hstox-install b/other/travis/hstox-install index 68b1eacb..f9d0f7b6 100755 --- a/other/travis/hstox-install +++ b/other/travis/hstox-install | |||
@@ -1,8 +1,5 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | ||
3 | set -e -u -x | ||
4 | . other/travis/env-$ENV.sh | ||
5 | |||
6 | # An initial update is required or the cabal cache will be empty and no packages | 3 | # An initial update is required or the cabal cache will be empty and no packages |
7 | # can be installed. | 4 | # can be installed. |
8 | cabal update | 5 | cabal update |
diff --git a/other/travis/hstox-script b/other/travis/hstox-script index 224d58cc..0c1953cb 100755 --- a/other/travis/hstox-script +++ b/other/travis/hstox-script | |||
@@ -1,6 +1,3 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | ||
3 | set -e -u -x | ||
4 | . other/travis/env-$ENV.sh | ||
5 | |||
6 | make -C ../hstox check-toxcore | 3 | make -C ../hstox check-toxcore |
diff --git a/other/travis/toxcore-after_script b/other/travis/toxcore-after_script deleted file mode 100755 index faa0d7a5..00000000 --- a/other/travis/toxcore-after_script +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | set -e -u -x | ||
4 | . other/travis/env-$ENV.sh | ||
5 | |||
6 | # Only submit coverage from the clang build. GCC and clang disagree slightly, | ||
7 | # so we arbitrarily choose the alphabetically first one for the report. | ||
8 | if [ "$CC" = "clang" ]; then | ||
9 | coveralls \ | ||
10 | --exclude auto_tests \ | ||
11 | --exclude other \ | ||
12 | --exclude testing \ | ||
13 | --gcov-options '\-lp' | ||
14 | fi | ||
diff --git a/other/travis/toxcore-linux-after_script b/other/travis/toxcore-linux-after_script new file mode 100755 index 00000000..7a388d0d --- /dev/null +++ b/other/travis/toxcore-linux-after_script | |||
@@ -0,0 +1,8 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | # We only submit coverage from the Linux build. | ||
4 | coveralls \ | ||
5 | --exclude auto_tests \ | ||
6 | --exclude other \ | ||
7 | --exclude testing \ | ||
8 | --gcov-options '\-lp' | ||
diff --git a/other/travis/toxcore-install b/other/travis/toxcore-linux-install index d2e67dbc..5cbe36db 100755 --- a/other/travis/toxcore-install +++ b/other/travis/toxcore-linux-install | |||
@@ -1,8 +1,5 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | ||
3 | set -e -u -x | ||
4 | . other/travis/env-$ENV.sh | ||
5 | |||
6 | # Set up opam. | 3 | # Set up opam. |
7 | opam init -y | 4 | opam init -y |
8 | eval `opam config env` | 5 | eval `opam config env` |
diff --git a/other/travis/toxcore-script b/other/travis/toxcore-script index 1b1482b9..3b9b383b 100755 --- a/other/travis/toxcore-script +++ b/other/travis/toxcore-script | |||
@@ -1,15 +1,16 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | ||
3 | set -e -u -x | 3 | # Enable test coverage recording. |
4 | . other/travis/env-$ENV.sh | 4 | export CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage" |
5 | 5 | ||
6 | # Build toxcore and run tests. | 6 | # Build toxcore and run tests. |
7 | export CFLAGS="-O3 -fprofile-arcs -ftest-coverage -DTRAVIS_ENV=1" | ||
8 | # TODO(iphydf): Enable ASAN. It currently has some bad interactions with gcov, | 7 | # TODO(iphydf): Enable ASAN. It currently has some bad interactions with gcov, |
9 | # so it's disabled on Travis. | 8 | # so it's disabled on Travis. |
10 | RUN $CMAKE -B$BUILD_DIR -H. -DCMAKE_INSTALL_PREFIX:PATH=$PREFIX -DDEBUG=ON -DASSOC_DHT=ON #-DASAN=ON | 9 | RUN $CMAKE -B$BUILD_DIR -H. -DCMAKE_INSTALL_PREFIX:PATH=$CURDIR/_install -DDEBUG=ON -DASSOC_DHT=ON #-DASAN=ON |
11 | 10 | ||
12 | export CTEST_OUTPUT_ON_FAILURE=1 | 11 | RUN make -C $BUILD_DIR -j$NPROC -k install |
13 | 12 | ||
14 | RUN $MAKE -C $BUILD_DIR -j$NPROC -k | 13 | if $TESTS; then |
15 | RUN $MAKE -C $BUILD_DIR -j$NPROC test | 14 | export CTEST_OUTPUT_ON_FAILURE=1 |
15 | RUN make -C $BUILD_DIR -j$NPROC test | ||
16 | fi | ||