Changeset View
Changeset View
Standalone View
Standalone View
contrib/teamcity/build-configurations.sh
Show First 20 Lines • Show All 81 Lines • ▼ Show 20 Lines | if [ -f "${log}" ]; then | ||||
cat "${log}" | cat "${log}" | ||||
fi | fi | ||||
done | done | ||||
} | } | ||||
trap "print_sanitizers_log" ERR | trap "print_sanitizers_log" ERR | ||||
CI_SCRIPTS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | CI_SCRIPTS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | ||||
DEVTOOLS_DIR="${TOPLEVEL}"/contrib/devtools | DEVTOOLS_DIR="${TOPLEVEL}"/contrib/devtools | ||||
build_with_cmake() { | |||||
CMAKE_FLAGS="${CMAKE_FLAGS[*]}" "${DEVTOOLS_DIR}"/build_cmake.sh "$@" | |||||
} | |||||
setup | setup | ||||
case "$ABC_BUILD_NAME" in | case "$ABC_BUILD_NAME" in | ||||
build-asan) | build-asan) | ||||
# Build with the address sanitizer, then run unit tests and functional tests. | # Build with the address sanitizer, then run unit tests and functional tests. | ||||
CMAKE_FLAGS=( | CMAKE_FLAGS=( | ||||
"-DCMAKE_CXX_FLAGS=-DARENA_DEBUG" | "-DCMAKE_CXX_FLAGS=-DARENA_DEBUG" | ||||
"-DCMAKE_BUILD_TYPE=Debug" | "-DCMAKE_BUILD_TYPE=Debug" | ||||
# ASAN does not support assembly code: https://github.com/google/sanitizers/issues/192 | # ASAN does not support assembly code: https://github.com/google/sanitizers/issues/192 | ||||
# This will trigger a segfault if the SSE4 implementation is selected for SHA256. | # This will trigger a segfault if the SSE4 implementation is selected for SHA256. | ||||
# Disabling the assembly works around the issue. | # Disabling the assembly works around the issue. | ||||
"-DCRYPTO_USE_ASM=OFF" | "-DCRYPTO_USE_ASM=OFF" | ||||
"-DENABLE_SANITIZERS=address" | "-DENABLE_SANITIZERS=address" | ||||
) | ) | ||||
CMAKE_FLAGS="${CMAKE_FLAGS[*]}" "${DEVTOOLS_DIR}"/build_cmake.sh --Werror --clang | build_with_cmake --Werror --clang | ||||
run_test_bitcoin "with address sanitizer" | run_test_bitcoin "with address sanitizer" | ||||
# Libs and utils tests | # Libs and utils tests | ||||
ninja \ | ninja \ | ||||
check-bitcoin-qt \ | check-bitcoin-qt \ | ||||
check-bitcoin-seeder \ | check-bitcoin-seeder \ | ||||
check-bitcoin-util \ | check-bitcoin-util \ | ||||
ninja check-functional | ninja check-functional | ||||
;; | ;; | ||||
build-ubsan) | build-ubsan) | ||||
# Build with the undefined sanitizer, then run unit tests and functional tests. | # Build with the undefined sanitizer, then run unit tests and functional tests. | ||||
CMAKE_FLAGS=( | CMAKE_FLAGS=( | ||||
"-DCMAKE_BUILD_TYPE=Debug" | "-DCMAKE_BUILD_TYPE=Debug" | ||||
"-DENABLE_SANITIZERS=undefined" | "-DENABLE_SANITIZERS=undefined" | ||||
) | ) | ||||
CMAKE_FLAGS="${CMAKE_FLAGS[*]}" "${DEVTOOLS_DIR}"/build_cmake.sh --Werror --clang | build_with_cmake --Werror --clang | ||||
run_test_bitcoin "with undefined sanitizer" | run_test_bitcoin "with undefined sanitizer" | ||||
# Libs and utils tests | # Libs and utils tests | ||||
ninja \ | ninja \ | ||||
check-bitcoin-qt \ | check-bitcoin-qt \ | ||||
check-bitcoin-seeder \ | check-bitcoin-seeder \ | ||||
check-bitcoin-util \ | check-bitcoin-util \ | ||||
ninja check-functional | ninja check-functional | ||||
;; | ;; | ||||
build-tsan) | build-tsan) | ||||
# Build with the thread sanitizer, then run unit tests and functional tests. | # Build with the thread sanitizer, then run unit tests and functional tests. | ||||
CMAKE_FLAGS=( | CMAKE_FLAGS=( | ||||
"-DENABLE_SANITIZERS=thread" | "-DENABLE_SANITIZERS=thread" | ||||
) | ) | ||||
CMAKE_FLAGS="${CMAKE_FLAGS[*]}" "${DEVTOOLS_DIR}"/build_cmake.sh --Werror --clang | build_with_cmake --Werror --clang | ||||
run_test_bitcoin "with thread sanitizer" | run_test_bitcoin "with thread sanitizer" | ||||
# Libs and utils tests | # Libs and utils tests | ||||
ninja \ | ninja \ | ||||
check-bitcoin-qt \ | check-bitcoin-qt \ | ||||
check-bitcoin-seeder \ | check-bitcoin-seeder \ | ||||
check-bitcoin-util \ | check-bitcoin-util \ | ||||
ninja check-functional | ninja check-functional | ||||
;; | ;; | ||||
build-diff) | build-diff) | ||||
# Build, run unit tests and functional tests. | # Build, run unit tests and functional tests. | ||||
"${DEVTOOLS_DIR}"/build_cmake.sh --Werror | build_with_cmake --Werror | ||||
# Unit tests | # Unit tests | ||||
run_test_bitcoin | run_test_bitcoin | ||||
run_test_bitcoin "with next upgrade activated" -phononactivationtime=1575158400 | run_test_bitcoin "with next upgrade activated" -phononactivationtime=1575158400 | ||||
# Libs and tools tests | # Libs and tools tests | ||||
# The leveldb tests need to run alone or they will sometimes fail with | # The leveldb tests need to run alone or they will sometimes fail with | ||||
# garbage output, see: | # garbage output, see: | ||||
Show All 10 Lines | build-diff) | ||||
# Functional tests | # Functional tests | ||||
ninja check-functional | ninja check-functional | ||||
ninja check-functional-upgrade-activated | ninja check-functional-upgrade-activated | ||||
;; | ;; | ||||
build-master) | build-master) | ||||
# Build, run unit tests and extended functional tests. | # Build, run unit tests and extended functional tests. | ||||
"${DEVTOOLS_DIR}"/build_cmake.sh --Werror | build_with_cmake --Werror | ||||
# Unit tests | # Unit tests | ||||
run_test_bitcoin | run_test_bitcoin | ||||
run_test_bitcoin "with next upgrade activated" -phononactivationtime=1575158400 | run_test_bitcoin "with next upgrade activated" -phononactivationtime=1575158400 | ||||
# Libs and tools tests | # Libs and tools tests | ||||
# The leveldb tests need to run alone or they will sometimes fail with | # The leveldb tests need to run alone or they will sometimes fail with | ||||
# garbage output, see: | # garbage output, see: | ||||
Show All 14 Lines | build-master) | ||||
;; | ;; | ||||
build-secp256k1) | build-secp256k1) | ||||
# Enable all the features but endomorphism. | # Enable all the features but endomorphism. | ||||
CMAKE_FLAGS=( | CMAKE_FLAGS=( | ||||
"-DSECP256K1_ENABLE_MODULE_ECDH=ON" | "-DSECP256K1_ENABLE_MODULE_ECDH=ON" | ||||
"-DSECP256K1_ENABLE_MODULE_MULTISET=ON" | "-DSECP256K1_ENABLE_MODULE_MULTISET=ON" | ||||
) | ) | ||||
CMAKE_FLAGS="${CMAKE_FLAGS[*]}" "${DEVTOOLS_DIR}"/build_cmake.sh secp256k1 --Werror | build_with_cmake --Werror secp256k1 | ||||
ninja check-secp256k1 | ninja check-secp256k1 | ||||
# Repeat with endomorphism. | # Repeat with endomorphism. | ||||
CMAKE_FLAGS+=( | CMAKE_FLAGS+=( | ||||
"-DSECP256K1_ENABLE_ENDOMORPHISM=ON" | "-DSECP256K1_ENABLE_ENDOMORPHISM=ON" | ||||
) | ) | ||||
CMAKE_FLAGS="${CMAKE_FLAGS[*]}" "${DEVTOOLS_DIR}"/build_cmake.sh secp256k1 --Werror | build_with_cmake --Werror secp256k1 | ||||
ninja check-secp256k1 | ninja check-secp256k1 | ||||
# Check JNI bindings. Note that Jemalloc needs to be disabled: | # Check JNI bindings. Note that Jemalloc needs to be disabled: | ||||
# https://github.com/jemalloc/jemalloc/issues/247 | # https://github.com/jemalloc/jemalloc/issues/247 | ||||
CMAKE_FLAGS=( | CMAKE_FLAGS=( | ||||
"-DSECP256K1_ENABLE_MODULE_ECDH=ON" | "-DSECP256K1_ENABLE_MODULE_ECDH=ON" | ||||
"-DSECP256K1_ENABLE_JNI=ON" | "-DSECP256K1_ENABLE_JNI=ON" | ||||
"-DUSE_JEMALLOC=OFF" | "-DUSE_JEMALLOC=OFF" | ||||
) | ) | ||||
CMAKE_FLAGS="${CMAKE_FLAGS[*]}" "${DEVTOOLS_DIR}"/build_cmake.sh secp256k1 --Werror | build_with_cmake --Werror secp256k1 | ||||
ninja check-secp256k1-java | ninja check-secp256k1-java | ||||
;; | ;; | ||||
build-without-cli) | build-without-cli) | ||||
# Build without bitcoin-cli | # Build without bitcoin-cli | ||||
CMAKE_FLAGS=( | CMAKE_FLAGS=( | ||||
"-DBUILD_BITCOIN_CLI=OFF" | "-DBUILD_BITCOIN_CLI=OFF" | ||||
) | ) | ||||
CMAKE_FLAGS="${CMAKE_FLAGS[*]}" "${DEVTOOLS_DIR}"/build_cmake.sh --Werror | build_with_cmake --Werror | ||||
ninja check-functional | ninja check-functional | ||||
;; | ;; | ||||
build-without-wallet) | build-without-wallet) | ||||
# Build without wallet and run the unit tests. | # Build without wallet and run the unit tests. | ||||
CMAKE_FLAGS=( | CMAKE_FLAGS=( | ||||
"-DBUILD_BITCOIN_WALLET=OFF" | "-DBUILD_BITCOIN_WALLET=OFF" | ||||
) | ) | ||||
CMAKE_FLAGS="${CMAKE_FLAGS[*]}" "${DEVTOOLS_DIR}"/build_cmake.sh --Werror | build_with_cmake --Werror | ||||
ninja check-bitcoin-qt | ninja check-bitcoin-qt | ||||
ninja check-functional | ninja check-functional | ||||
run_test_bitcoin "without wallet" | run_test_bitcoin "without wallet" | ||||
;; | ;; | ||||
build-without-zmq) | build-without-zmq) | ||||
# Build without Zeromq and run the unit tests. | # Build without Zeromq and run the unit tests. | ||||
CMAKE_FLAGS=( | CMAKE_FLAGS=( | ||||
"-DBUILD_BITCOIN_ZMQ=OFF" | "-DBUILD_BITCOIN_ZMQ=OFF" | ||||
) | ) | ||||
CMAKE_FLAGS="${CMAKE_FLAGS[*]}" "${DEVTOOLS_DIR}"/build_cmake.sh --Werror | build_with_cmake --Werror | ||||
ninja check-bitcoin-qt | ninja check-bitcoin-qt | ||||
ninja check-functional | ninja check-functional | ||||
run_test_bitcoin "without zmq" | run_test_bitcoin "without zmq" | ||||
;; | ;; | ||||
build-ibd) | build-ibd) | ||||
"${DEVTOOLS_DIR}"/build_cmake.sh | build_with_cmake | ||||
"${CI_SCRIPTS_DIR}"/ibd.sh -disablewallet -debug=net | "${CI_SCRIPTS_DIR}"/ibd.sh -disablewallet -debug=net | ||||
;; | ;; | ||||
build-ibd-no-assumevalid-checkpoint) | build-ibd-no-assumevalid-checkpoint) | ||||
"${DEVTOOLS_DIR}"/build_cmake.sh | build_with_cmake | ||||
"${CI_SCRIPTS_DIR}"/ibd.sh -disablewallet -assumevalid=0 -checkpoints=0 -debug=net | "${CI_SCRIPTS_DIR}"/ibd.sh -disablewallet -assumevalid=0 -checkpoints=0 -debug=net | ||||
;; | ;; | ||||
build-clang-10) | build-clang-10) | ||||
# Use clang-10 for this build instead of the default clang-8. | # Use clang-10 for this build instead of the default clang-8. | ||||
# This allow for checking that no warning is introduced for newer versions | # This allow for checking that no warning is introduced for newer versions | ||||
# of the compiler | # of the compiler | ||||
CMAKE_FLAGS=( | CMAKE_FLAGS=( | ||||
"-DCMAKE_C_COMPILER=clang-10" | "-DCMAKE_C_COMPILER=clang-10" | ||||
"-DCMAKE_CXX_COMPILER=clang++-10" | "-DCMAKE_CXX_COMPILER=clang++-10" | ||||
) | ) | ||||
CMAKE_FLAGS="${CMAKE_FLAGS[*]}" "${DEVTOOLS_DIR}"/build_cmake.sh --Werror | build_with_cmake --Werror | ||||
ninja \ | ninja \ | ||||
test_bitcoin \ | test_bitcoin \ | ||||
test_bitcoin-qt \ | test_bitcoin-qt \ | ||||
test_bitcoin-seeder \ | test_bitcoin-seeder \ | ||||
secp256k1-tests \ | secp256k1-tests \ | ||||
secp256k1-exhaustive_tests | secp256k1-exhaustive_tests | ||||
# TODO do the same with the latest GCC | # TODO do the same with the latest GCC | ||||
;; | ;; | ||||
build-autotools) | build-autotools) | ||||
# Ensure that the build using autotools is not broken | # Ensure that the build using autotools is not broken | ||||
"${DEVTOOLS_DIR}"/build_autotools.sh | "${DEVTOOLS_DIR}"/build_autotools.sh | ||||
make -j "${THREADS}" check | make -j "${THREADS}" check | ||||
;; | ;; | ||||
build-bench) | build-bench) | ||||
# Build and run the benchmarks. | # Build and run the benchmarks. | ||||
CMAKE_FLAGS=( | CMAKE_FLAGS=( | ||||
"-DBUILD_BITCOIN_WALLET=ON" | "-DBUILD_BITCOIN_WALLET=ON" | ||||
"-DSECP256K1_ENABLE_MODULE_ECDH=ON" | "-DSECP256K1_ENABLE_MODULE_ECDH=ON" | ||||
"-DSECP256K1_ENABLE_MODULE_MULTISET=ON" | "-DSECP256K1_ENABLE_MODULE_MULTISET=ON" | ||||
) | ) | ||||
CMAKE_FLAGS="${CMAKE_FLAGS[*]}" "${DEVTOOLS_DIR}"/build_cmake.sh bitcoin-bench --Werror | build_with_cmake --Werror bitcoin-bench | ||||
./src/bench/bitcoin-bench -printer=junit > junit_results_bench.xml | ./src/bench/bitcoin-bench -printer=junit > junit_results_bench.xml | ||||
ninja bench-secp256k1 | ninja bench-secp256k1 | ||||
;; | ;; | ||||
build-make-generator) | build-make-generator) | ||||
# Ensure that the build using cmake and the "Unix Makefiles" generator is | # Ensure that the build using cmake and the "Unix Makefiles" generator is | ||||
# not broken. | # not broken. | ||||
cd ${BUILD_DIR} | cd ${BUILD_DIR} | ||||
git clean -xffd | git clean -xffd | ||||
cmake -G "Unix Makefiles" .. | cmake -G "Unix Makefiles" .. | ||||
make -j "${THREADS}" all check | make -j "${THREADS}" all check | ||||
;; | ;; | ||||
build-coverage) | build-coverage) | ||||
CMAKE_FLAGS=( | CMAKE_FLAGS=( | ||||
"-DENABLE_COVERAGE=ON" | "-DENABLE_COVERAGE=ON" | ||||
"-DENABLE_BRANCH_COVERAGE=ON" | "-DENABLE_BRANCH_COVERAGE=ON" | ||||
) | ) | ||||
CMAKE_FLAGS="${CMAKE_FLAGS[*]}" "${DEVTOOLS_DIR}"/build_cmake.sh coverage-check-extended --gcc | build_with_cmake --gcc coverage-check-extended | ||||
# Publish the coverage report in a format that Teamcity understands | # Publish the coverage report in a format that Teamcity understands | ||||
pushd check-extended.coverage | pushd check-extended.coverage | ||||
# Run from the coverage directory to prevent tar from creating a top level | # Run from the coverage directory to prevent tar from creating a top level | ||||
# folder in the generated archive. | # folder in the generated archive. | ||||
tar -czf ../coverage.tar.gz -- * | tar -czf ../coverage.tar.gz -- * | ||||
popd | popd | ||||
;; | ;; | ||||
build-clang-tidy) | build-clang-tidy) | ||||
CMAKE_FLAGS=( | CMAKE_FLAGS=( | ||||
"-DCMAKE_EXPORT_COMPILE_COMMANDS=ON" | "-DCMAKE_EXPORT_COMPILE_COMMANDS=ON" | ||||
) | ) | ||||
CMAKE_FLAGS="${CMAKE_FLAGS[*]}" "${DEVTOOLS_DIR}"/build_cmake.sh --clang | build_with_cmake --clang | ||||
# Set the default for debian but allow the user to override, as the name is | # Set the default for debian but allow the user to override, as the name is | ||||
# not standard across distributions (and it's not always in the PATH). | # not standard across distributions (and it's not always in the PATH). | ||||
: "${CLANG_TIDY_DIFF_SCRIPT:=clang-tidy-diff-8.py}" | : "${CLANG_TIDY_DIFF_SCRIPT:=clang-tidy-diff-8.py}" | ||||
CLANG_TIDY_WARNING_FILE="${BUILD_DIR}/clang-tidy-warnings.txt" | CLANG_TIDY_WARNING_FILE="${BUILD_DIR}/clang-tidy-warnings.txt" | ||||
pushd "${TOPLEVEL}" | pushd "${TOPLEVEL}" | ||||
git diff -U0 HEAD^ | "${CLANG_TIDY_DIFF_SCRIPT}" \ | git diff -U0 HEAD^ | "${CLANG_TIDY_DIFF_SCRIPT}" \ | ||||
Show All 10 Lines | case "$ABC_BUILD_NAME" in | ||||
build-win64) | build-win64) | ||||
"${DEVTOOLS_DIR}"/build_depends.sh | "${DEVTOOLS_DIR}"/build_depends.sh | ||||
CMAKE_FLAGS=( | CMAKE_FLAGS=( | ||||
"-DCMAKE_TOOLCHAIN_FILE=${CMAKE_PLATFORMS_DIR}/Win64.cmake" | "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_PLATFORMS_DIR}/Win64.cmake" | ||||
"-DBUILD_BITCOIN_SEEDER=OFF" | "-DBUILD_BITCOIN_SEEDER=OFF" | ||||
"-DCPACK_STRIP_FILES=ON" | "-DCPACK_STRIP_FILES=ON" | ||||
) | ) | ||||
CMAKE_FLAGS="${CMAKE_FLAGS[*]}" "${DEVTOOLS_DIR}"/build_cmake.sh | build_with_cmake | ||||
# Build all the targets that are not built as part of the default target | # Build all the targets that are not built as part of the default target | ||||
ninja test_bitcoin test_bitcoin-qt | ninja test_bitcoin test_bitcoin-qt | ||||
ninja package | ninja package | ||||
# Running the tests with wine and jemalloc is causing deadlocks, so disable | # Running the tests with wine and jemalloc is causing deadlocks, so disable | ||||
# jemalloc prior running the tests. | # jemalloc prior running the tests. | ||||
# FIXME figure out what is causing the deadlock. Example output: | # FIXME figure out what is causing the deadlock. Example output: | ||||
# 01fe:err:ntdll:RtlpWaitForCriticalSection section 0x39e081b0 "?" wait | # 01fe:err:ntdll:RtlpWaitForCriticalSection section 0x39e081b0 "?" wait | ||||
# timed out in thread 01fe, blocked by 01cd, retrying (60 sec) | # timed out in thread 01fe, blocked by 01cd, retrying (60 sec) | ||||
CMAKE_FLAGS+=( | CMAKE_FLAGS+=( | ||||
"-DUSE_JEMALLOC=OFF" | "-DUSE_JEMALLOC=OFF" | ||||
) | ) | ||||
CMAKE_FLAGS="${CMAKE_FLAGS[*]}" "${DEVTOOLS_DIR}"/build_cmake.sh test_bitcoin | build_with_cmake test_bitcoin | ||||
# Run the tests. Not all will run with wine, so exclude them | # Run the tests. Not all will run with wine, so exclude them | ||||
find src -name "libbitcoinconsensus*.dll" -exec cp {} src/test/ \; | find src -name "libbitcoinconsensus*.dll" -exec cp {} src/test/ \; | ||||
wine ./src/test/test_bitcoin.exe --run_test=\!radix_tests,rcu_tests | wine ./src/test/test_bitcoin.exe --run_test=\!radix_tests,rcu_tests | ||||
;; | ;; | ||||
build-osx) | build-osx) | ||||
export PYTHONPATH="${TOPLEVEL}/depends/x86_64-apple-darwin16/native/lib/python3/dist-packages:${PYTHONPATH:-}" | export PYTHONPATH="${TOPLEVEL}/depends/x86_64-apple-darwin16/native/lib/python3/dist-packages:${PYTHONPATH:-}" | ||||
"${DEVTOOLS_DIR}"/build_depends.sh | "${DEVTOOLS_DIR}"/build_depends.sh | ||||
CMAKE_FLAGS=( | CMAKE_FLAGS=( | ||||
"-DCMAKE_TOOLCHAIN_FILE=${CMAKE_PLATFORMS_DIR}/OSX.cmake" | "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_PLATFORMS_DIR}/OSX.cmake" | ||||
) | ) | ||||
CMAKE_FLAGS="${CMAKE_FLAGS[*]}" "${DEVTOOLS_DIR}"/build_cmake.sh | build_with_cmake | ||||
# Build all the targets that are not built as part of the default target | # Build all the targets that are not built as part of the default target | ||||
ninja test_bitcoin test_bitcoin-qt test_bitcoin-seeder | ninja test_bitcoin test_bitcoin-qt test_bitcoin-seeder | ||||
ninja osx-dmg | ninja osx-dmg | ||||
;; | ;; | ||||
build-linux-arm) | build-linux-arm) | ||||
Show All 16 Lines | CMAKE_FLAGS=( | ||||
# qemu stderr to end up in the node stderr and fail the functional | # qemu stderr to end up in the node stderr and fail the functional | ||||
# tests. | # tests. | ||||
# Disabling the unsupported feature (here bypassing the config | # Disabling the unsupported feature (here bypassing the config | ||||
# detection) fixes the issue. | # detection) fixes the issue. | ||||
# FIXME: get rid of the hack, either by using a better qemu version | # FIXME: get rid of the hack, either by using a better qemu version | ||||
# or by filtering stderr at the framework level. | # or by filtering stderr at the framework level. | ||||
"-DHAVE_DECL_GETIFADDRS=OFF" | "-DHAVE_DECL_GETIFADDRS=OFF" | ||||
) | ) | ||||
CMAKE_FLAGS="${CMAKE_FLAGS[*]}" "${DEVTOOLS_DIR}"/build_cmake.sh | build_with_cmake | ||||
# Let qemu know where to find the system libraries | # Let qemu know where to find the system libraries | ||||
export QEMU_LD_PREFIX=/usr/arm-linux-gnueabihf | export QEMU_LD_PREFIX=/usr/arm-linux-gnueabihf | ||||
# Unit tests | # Unit tests | ||||
ninja check | ninja check | ||||
ninja check-secp256k1 | ninja check-secp256k1 | ||||
Show All 21 Lines | CMAKE_FLAGS=( | ||||
# qemu stderr to end up in the node stderr and fail the functional | # qemu stderr to end up in the node stderr and fail the functional | ||||
# tests. | # tests. | ||||
# Disabling the unsupported feature (here bypassing the config | # Disabling the unsupported feature (here bypassing the config | ||||
# detection) fixes the issue. | # detection) fixes the issue. | ||||
# FIXME: get rid of the hack, either by using a better qemu version | # FIXME: get rid of the hack, either by using a better qemu version | ||||
# or by filtering stderr at the framework level. | # or by filtering stderr at the framework level. | ||||
"-DHAVE_DECL_GETIFADDRS=OFF" | "-DHAVE_DECL_GETIFADDRS=OFF" | ||||
) | ) | ||||
CMAKE_FLAGS="${CMAKE_FLAGS[*]}" "${DEVTOOLS_DIR}"/build_cmake.sh | build_with_cmake | ||||
# Let qemu know where to find the system libraries | # Let qemu know where to find the system libraries | ||||
export QEMU_LD_PREFIX=/usr/aarch64-linux-gnu | export QEMU_LD_PREFIX=/usr/aarch64-linux-gnu | ||||
# Unit tests | # Unit tests | ||||
ninja check | ninja check | ||||
ninja check-secp256k1 | ninja check-secp256k1 | ||||
# Functional tests | # Functional tests | ||||
ninja check-functional | ninja check-functional | ||||
;; | ;; | ||||
build-linux64) | build-linux64) | ||||
"${DEVTOOLS_DIR}"/build_depends.sh | "${DEVTOOLS_DIR}"/build_depends.sh | ||||
# Build, run unit tests and functional tests. | # Build, run unit tests and functional tests. | ||||
CMAKE_FLAGS=( | CMAKE_FLAGS=( | ||||
"-DCMAKE_TOOLCHAIN_FILE=${CMAKE_PLATFORMS_DIR}/Linux64.cmake" | "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_PLATFORMS_DIR}/Linux64.cmake" | ||||
"-DENABLE_PROPERTY_BASED_TESTS=ON" | "-DENABLE_PROPERTY_BASED_TESTS=ON" | ||||
) | ) | ||||
CMAKE_FLAGS="${CMAKE_FLAGS[*]}" "${DEVTOOLS_DIR}"/build_cmake.sh | build_with_cmake | ||||
# Unit tests | # Unit tests | ||||
run_test_bitcoin "for Linux 64 bits" | run_test_bitcoin "for Linux 64 bits" | ||||
ninja \ | ninja \ | ||||
check-bitcoin-qt \ | check-bitcoin-qt \ | ||||
check-bitcoin-seeder \ | check-bitcoin-seeder \ | ||||
check-bitcoin-util \ | check-bitcoin-util \ | ||||
check-secp256k1 | check-secp256k1 | ||||
# Functional tests | # Functional tests | ||||
ninja check-functional | ninja check-functional | ||||
;; | ;; | ||||
check-seeds) | check-seeds) | ||||
"${DEVTOOLS_DIR}"/build_cmake.sh bitcoind bitcoin-cli | build_with_cmake bitcoind bitcoin-cli | ||||
# Run on different ports to avoid a race where the rpc port used in the | # Run on different ports to avoid a race where the rpc port used in the | ||||
# first run may not be closed in time for the second to start. | # first run may not be closed in time for the second to start. | ||||
SEEDS_DIR="${TOPLEVEL}"/contrib/seeds | SEEDS_DIR="${TOPLEVEL}"/contrib/seeds | ||||
RPC_PORT=18832 "${SEEDS_DIR}"/check-seeds.sh main 80 | RPC_PORT=18832 "${SEEDS_DIR}"/check-seeds.sh main 80 | ||||
RPC_PORT=18833 "${SEEDS_DIR}"/check-seeds.sh test 70 | RPC_PORT=18833 "${SEEDS_DIR}"/check-seeds.sh test 70 | ||||
;; | ;; | ||||
*) | *) | ||||
echo "Error: Invalid build name '${ABC_BUILD_NAME}'" | echo "Error: Invalid build name '${ABC_BUILD_NAME}'" | ||||
exit 2 | exit 2 | ||||
;; | ;; | ||||
esac | esac |