Changeset View
Changeset View
Standalone View
Standalone View
contrib/teamcity/build.sh
Show All 24 Lines | |||||
: ${DISABLE_WALLET:=} | : ${DISABLE_WALLET:=} | ||||
CONFIGURE_FLAGS=("--prefix=`pwd`") | CONFIGURE_FLAGS=("--prefix=`pwd`") | ||||
if [[ ! -z "${DISABLE_WALLET}" ]]; then | if [[ ! -z "${DISABLE_WALLET}" ]]; then | ||||
echo "*** Building without wallet" | echo "*** Building without wallet" | ||||
CONFIGURE_FLAGS+=("--disable-wallet") | CONFIGURE_FLAGS+=("--disable-wallet") | ||||
fi | fi | ||||
# Default to nothing | |||||
: ${ENABLE_DEBUG:=} | |||||
if [[ ! -z "${ENABLE_DEBUG}" ]]; then | |||||
echo "*** Building with debug" | |||||
CONFIGURE_FLAGS+=("--enable-debug") | |||||
fi | |||||
../configure "${CONFIGURE_FLAGS[@]}" | ../configure "${CONFIGURE_FLAGS[@]}" | ||||
# Run build | # Run build | ||||
make -j ${THREADS} | make -j ${THREADS} | ||||
# Default to nothing | # Default to nothing | ||||
: ${DISABLE_TESTS:=} | : ${DISABLE_TESTS:=} | ||||
# If DISABLE_TESTS is unset (default), run the tests | # If DISABLE_TESTS is unset (default), run the tests | ||||
if [[ -z "${DISABLE_TESTS}" ]]; then | if [[ -z "${DISABLE_TESTS}" ]]; then | ||||
echo "*** Running tests" | echo "*** Running tests" | ||||
# Run unit tests | # Run unit tests | ||||
make -j ${THREADS} check | make -j ${THREADS} check | ||||
# FIXME Remove when the functional tests are running with debug enabled | |||||
if [[ -z "${ENABLE_DEBUG}" ]]; then | |||||
mkdir -p output/ | mkdir -p output/ | ||||
BRANCH=$(git rev-parse --abbrev-ref HEAD) | BRANCH=$(git rev-parse --abbrev-ref HEAD) | ||||
if [[ ! -z "${DISABLE_WALLET}" ]]; then | if [[ ! -z "${DISABLE_WALLET}" ]]; then | ||||
echo "Skipping rpc testing due to disabled wallet functionality." | echo "Skipping rpc testing due to disabled wallet functionality." | ||||
elif [[ "${BRANCH}" == "master" ]]; then | elif [[ "${BRANCH}" == "master" ]]; then | ||||
./test/functional/test_runner.py --cutoff=600 --tmpdirprefix=output | ./test/functional/test_runner.py --cutoff=600 --tmpdirprefix=output | ||||
./test/functional/test_runner.py --cutoff=600 --tmpdirprefix=output --with-greatwallactivation | ./test/functional/test_runner.py --cutoff=600 --tmpdirprefix=output --with-greatwallactivation | ||||
else | else | ||||
./test/functional/test_runner.py --tmpdirprefix=output | ./test/functional/test_runner.py --tmpdirprefix=output | ||||
./test/functional/test_runner.py --tmpdirprefix=output --with-greatwallactivation | ./test/functional/test_runner.py --tmpdirprefix=output --with-greatwallactivation | ||||
fi | fi | ||||
else | else | ||||
echo "*** Functional tests have been skipped" | |||||
fi | |||||
else | |||||
echo "*** Tests have been skipped" | echo "*** Tests have been skipped" | ||||
fi | fi | ||||