Changeset View
Changeset View
Standalone View
Standalone View
contrib/teamcity/build-configurations.sh
Show All 21 Lines | setup() { | ||||
export BUILD_DIR | export BUILD_DIR | ||||
cd "${BUILD_DIR}" | cd "${BUILD_DIR}" | ||||
# Determine the number of build threads | # Determine the number of build threads | ||||
THREADS=$(nproc || sysctl -n hw.ncpu) | THREADS=$(nproc || sysctl -n hw.ncpu) | ||||
export THREADS | export THREADS | ||||
# Base directories for sanitizer related files | # Base directories for sanitizer related files | ||||
SAN_SUPP_DIR="${TOPLEVEL}/test/sanitizer_suppressions" | SAN_SUPP_DIR="${TOPLEVEL}/test/sanitizer_suppressions" | ||||
SAN_LOG_DIR="/tmp/sanitizer_logs" | SAN_LOG_DIR="/tmp/sanitizer_logs" | ||||
# Create the log directory if it doesn't exist and clear it | # Create the log directory if it doesn't exist and clear it | ||||
mkdir -p "${SAN_LOG_DIR}" | mkdir -p "${SAN_LOG_DIR}" | ||||
rm -rf "${SAN_LOG_DIR:?}"/* | rm -rf "${SAN_LOG_DIR:?}"/* | ||||
# Sanitizers options, not used if sanitizers are not enabled | # Sanitizers options, not used if sanitizers are not enabled | ||||
Show All 10 Lines | run_test_bitcoin() { | ||||
# Usage: run_test_bitcoin "Context as string" [arguments...] | # Usage: run_test_bitcoin "Context as string" [arguments...] | ||||
ninja test_bitcoin | ninja test_bitcoin | ||||
TEST_BITCOIN_JUNIT="junit_results_unit_tests${1:+_${1// /_}}.xml" | TEST_BITCOIN_JUNIT="junit_results_unit_tests${1:+_${1// /_}}.xml" | ||||
TEST_BITCOIN_SUITE_NAME="Bitcoin ABC unit tests${1:+ $1}" | TEST_BITCOIN_SUITE_NAME="Bitcoin ABC unit tests${1:+ $1}" | ||||
./src/test/test_bitcoin \ | ./src/test/test_bitcoin \ | ||||
--logger=HRF:JUNIT,${UNIT_TESTS_JUNIT_LOG_LEVEL},${TEST_BITCOIN_JUNIT} \ | --logger=HRF:JUNIT,${UNIT_TESTS_JUNIT_LOG_LEVEL},${TEST_BITCOIN_JUNIT} \ | ||||
--catch_system_errors=no \ | |||||
-- \ | -- \ | ||||
-testsuitename="${TEST_BITCOIN_SUITE_NAME}" \ | -testsuitename="${TEST_BITCOIN_SUITE_NAME}" \ | ||||
"${@:2}" | "${@:2}" | ||||
} | } | ||||
# Facility to print out sanitizer log outputs to the build log console | # Facility to print out sanitizer log outputs to the build log console | ||||
print_sanitizers_log() { | print_sanitizers_log() { | ||||
for log in "${SAN_LOG_DIR}"/*.log.* | for log in "${SAN_LOG_DIR}"/*.log.* | ||||
▲ Show 20 Lines • Show All 107 Lines • ▼ Show 20 Lines | build-diff) | ||||
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. | ||||
CMAKE_FLAGS=( | CMAKE_FLAGS=( | ||||
"-DSECP256K1_ENABLE_MODULE_ECDH=ON" | "-DSECP256K1_ENABLE_MODULE_ECDH=ON" | ||||
"-DSECP256K1_ENABLE_JNI=ON" | "-DSECP256K1_ENABLE_JNI=ON" | ||||
"-DCMAKE_BUILD_TYPE=Debug" | |||||
) | ) | ||||
CMAKE_FLAGS="${CMAKE_FLAGS[*]}" "${CI_SCRIPTS_DIR}"/build_cmake.sh | CMAKE_FLAGS="${CMAKE_FLAGS[*]}" "${CI_SCRIPTS_DIR}"/build_cmake.sh | ||||
ulimit -c unlimited | |||||
echo "CORE ULIMIT SET TO:" | |||||
ulimit -c | |||||
# 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 | |||||
ninja \ | |||||
check-bitcoin-qt \ | |||||
check-bitcoin-seeder \ | |||||
check-bitcoin-util \ | |||||
check-devtools \ | |||||
check-leveldb \ | |||||
check-rpcauth \ | |||||
check-secp256k1 \ | |||||
check-univalue \ | |||||
# Functional tests | |||||
ninja check-functional-extended | |||||
ninja check-functional-upgrade-activated-extended | |||||
;; | ;; | ||||
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[*]}" "${CI_SCRIPTS_DIR}"/build_cmake.sh | CMAKE_FLAGS="${CMAKE_FLAGS[*]}" "${CI_SCRIPTS_DIR}"/build_cmake.sh | ||||
▲ Show 20 Lines • Show All 56 Lines • Show Last 20 Lines |