Only gracefully timeout Travis when integration tests need to be run (#2933)

* Split RUN_TESTS into RUN_UNITTESTS and RUN_INTEGRATIONTESTS

* Only gracefully timeout when RUN_INTEGRATIONTESTS=true
This commit is contained in:
Alexander Block 2019-05-22 23:21:21 +02:00 committed by UdjinM6
parent 7c05aa8213
commit f1fe24b676
4 changed files with 14 additions and 8 deletions

View File

@ -75,8 +75,8 @@ script:
# Next build should fix this situation as it will start with a populated cache
- if [ $SECONDS -gt 1200 ]; then export TIMEOUT="true"; false; fi # The "false" here ensures that the build is marked as failed even though the whole script returns 0
- test "$TIMEOUT" != "true" && $DOCKER_RUN_IN_BUILDER ./ci/build_src.sh
- if [ $SECONDS -gt 1800 ]; then export TIMEOUT="true"; false; fi # The "false" here ensures that the build is marked as failed even though the whole script returns 0
- test "$TIMEOUT" != "true" && $DOCKER_RUN_IN_BUILDER ./ci/test_unittests.sh
- if [ $SECONDS -gt 1800 -a "$RUN_INTEGRATIONTESTS" = "true" ]; then export TIMEOUT="true"; false; fi # The "false" here ensures that the build is marked as failed even though the whole script returns 0
- test "$TIMEOUT" != "true" && $DOCKER_RUN_IN_BUILDER ./ci/test_integrationtests.sh --jobs=3
- test "$TIMEOUT" != "true" && if [ "$DOCKER_BUILD" = "true" ]; then BUILD_DIR=build-ci/dashcore-$BUILD_TARGET ./docker/build-docker.sh; fi
after_script:

View File

@ -30,6 +30,9 @@ export SDK_URL=${SDK_URL:-https://bitcoincore.org/depends-sources/sdks}
export PYTHON_DEBUG=1
export MAKEJOBS="-j4"
export RUN_UNITTESTS=false
export RUN_INTEGRATIONTESTS=false
if [ "$BUILD_TARGET" = "arm-linux" ]; then
export HOST=arm-linux-gnueabihf
export PACKAGES="g++-arm-linux-gnueabihf"
@ -41,21 +44,22 @@ elif [ "$BUILD_TARGET" = "win32" ]; then
export PACKAGES="python3 nsis g++-mingw-w64-i686 wine-stable wine32 bc"
export BITCOIN_CONFIG="--enable-gui --enable-reduce-exports --disable-miner"
export DIRECT_WINE_EXEC_TESTS=true
export RUN_TESTS=true
export RUN_UNITTESTS=true
elif [ "$BUILD_TARGET" = "win64" ]; then
export HOST=x86_64-w64-mingw32
export DPKG_ADD_ARCH="i386"
export PACKAGES="python3 nsis g++-mingw-w64-x86-64 wine-stable wine64 bc"
export BITCOIN_CONFIG="--enable-gui --enable-reduce-exports --disable-miner"
export DIRECT_WINE_EXEC_TESTS=true
export RUN_TESTS=true
export RUN_UNITTESTS=true
elif [ "$BUILD_TARGET" = "linux32" ]; then
export HOST=i686-pc-linux-gnu
export PACKAGES="g++-multilib bc python3-zmq"
export BITCOIN_CONFIG="--enable-zmq --enable-glibc-back-compat --enable-reduce-exports --enable-stacktraces LDFLAGS=-static-libstdc++"
export USE_SHELL="/bin/dash"
export PYZMQ=true
export RUN_TESTS=true
export RUN_UNITTESTS=true
export RUN_INTEGRATIONTESTS=true
elif [ "$BUILD_TARGET" = "linux64" ]; then
export HOST=x86_64-unknown-linux-gnu
export PACKAGES="bc python3-zmq"
@ -63,19 +67,21 @@ elif [ "$BUILD_TARGET" = "linux64" ]; then
export BITCOIN_CONFIG="--enable-zmq --enable-glibc-back-compat --enable-reduce-exports --enable-stacktraces"
export CPPFLAGS="-DDEBUG_LOCKORDER -DENABLE_DASH_DEBUG"
export PYZMQ=true
export RUN_TESTS=true
export RUN_UNITTESTS=true
export RUN_INTEGRATIONTESTS=true
elif [ "$BUILD_TARGET" = "linux64_nowallet" ]; then
export HOST=x86_64-unknown-linux-gnu
export PACKAGES="python3"
export DEP_OPTS="NO_WALLET=1"
export BITCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports"
export RUN_TESTS=true
export RUN_UNITTESTS=true
elif [ "$BUILD_TARGET" = "linux64_release" ]; then
export HOST=x86_64-unknown-linux-gnu
export PACKAGES="bc python3-zmq"
export DEP_OPTS="NO_UPNP=1"
export BITCOIN_CONFIG="--enable-zmq --enable-glibc-back-compat --enable-reduce-exports"
export PYZMQ=true
export RUN_UNITTESTS=true
elif [ "$BUILD_TARGET" = "mac" ]; then
export HOST=x86_64-apple-darwin11
export PACKAGES="cmake imagemagick libcap-dev librsvg2-bin libz-dev libbz2-dev libtiff-tools"

View File

@ -8,7 +8,7 @@ PASS_ARGS="$@"
source ./ci/matrix.sh
if [ "$RUN_TESTS" != "true" ]; then
if [ "$RUN_INTEGRATIONTESTS" != "true" ]; then
echo "Skipping integration tests"
exit 0
fi

View File

@ -6,7 +6,7 @@ set -e
source ./ci/matrix.sh
if [ "$RUN_TESTS" != "true" ]; then
if [ "$RUN_UNITTESTS" != "true" ]; then
echo "Skipping unit tests"
exit 0
fi