diff --git a/contrib/teamcity/build.sh b/contrib/teamcity/build.sh --- a/contrib/teamcity/build.sh +++ b/contrib/teamcity/build.sh @@ -35,21 +35,31 @@ # Run build make -j ${THREADS} -# Run unit tests -make check +# Default to nothing +: ${DISABLE_TESTS:=} -# Run util tests -./test/util/bitcoin-util-test.py +# If DISABLE_TESTS is unset (default), run the tests +if [[ -z "${DISABLE_TESTS}" ]]; then + echo "*** Running tests" -mkdir -p output/ -BRANCH=$(git rev-parse --abbrev-ref HEAD) -if [[ ! -z "${DISABLE_WALLET}" ]]; then - echo "Skipping rpc testing due to disabled wallet functionality." -elif [[ "${BRANCH}" == "master" ]]; then - ./test/functional/test_runner.py --cutoff=600 --tmpdirprefix=output - ./test/functional/test_runner.py --cutoff=600 --tmpdirprefix=output --with-greatwallactivation + # Run unit tests + make check + + # Run util tests + ./test/util/bitcoin-util-test.py + + mkdir -p output/ + BRANCH=$(git rev-parse --abbrev-ref HEAD) + if [[ ! -z "${DISABLE_WALLET}" ]]; then + echo "Skipping rpc testing due to disabled wallet functionality." + elif [[ "${BRANCH}" == "master" ]]; then + ./test/functional/test_runner.py --cutoff=600 --tmpdirprefix=output + ./test/functional/test_runner.py --cutoff=600 --tmpdirprefix=output --with-greatwallactivation + else + ./test/functional/test_runner.py --tmpdirprefix=output + ./test/functional/test_runner.py --tmpdirprefix=output --with-greatwallactivation + fi else - ./test/functional/test_runner.py --tmpdirprefix=output - ./test/functional/test_runner.py --tmpdirprefix=output --with-greatwallactivation + echo "*** Tests have been skipped" fi