v31.1-roots.1 · Commit 8: [PATCH 08/17] chore(roots): integrate v31 identity and maintenance tooling
ci/test/03_test_script.sh
Before: ci/test/03_test_script.sh · After: ci/test/03_test_script.sh
File metadata
index 8af2ceecf3896bb77e0bc1aa499444117a9e4fd8..92e376a44bbe3f31a6c4bc0f9c343df89a58be2b 100755
Download original patch · Release notes
Diff rows 1–80 of 80. Line numbers refer to the original before/after files.
+ Added− RemovedUnmarked lines are context.
Scroll the code area horizontally to read long lines. Before is on the left; after is on the right. Unified view fits narrow screens more easily.
ci/test/03_test_script.sh
CHANGED
|
@@ -8,6 +8,9 @@ export LC_ALL=C.UTF-8
|
|
| 8 |
|
| 9 |
set -ex
|
| 10 |
|
|
|
|
|
|
|
|
|
|
| 11 |
cd "${BASE_ROOT_DIR}"
|
| 12 |
|
| 13 |
export PATH="/path_with space:${PATH}"
|
|
@@ -31,7 +34,7 @@ df -h
|
|
| 31 |
# kernel mismatch between a cached docker image and the underlying host.
|
| 32 |
# This can happen occasionally on hosted runners if the runner image is updated.
|
| 33 |
if [[ "$CONTAINER_NAME" == "ci_native_asan" ]]; then
|
| 34 |
-
$CI_RETRY_EXE apt-get update
|
| 35 |
${CI_RETRY_EXE} bash -c "apt-get install --no-install-recommends --no-upgrade -y $PACKAGES"
|
| 36 |
fi
|
| 37 |
|
|
@@ -44,7 +47,7 @@ echo "=== BEGIN env ==="
|
|
| 44 |
env
|
| 45 |
echo "=== END env ==="
|
| 46 |
|
| 47 |
-
if [ "$RUN_FUZZ_TESTS" = "true" ]; then
|
| 48 |
export DIR_FUZZ_IN=${DIR_QA_ASSETS}/fuzz_corpora/
|
| 49 |
if [ ! -d "$DIR_FUZZ_IN" ]; then
|
| 50 |
${CI_RETRY_EXE} git clone --depth=1 https://github.com/bitcoin-core/qa-assets "${DIR_QA_ASSETS}"
|
|
@@ -92,6 +95,10 @@ ccache --zero-stats
|
|
| 92 |
BASE_BUILD_DIR=${BASE_BUILD_DIR:-$BASE_SCRATCH_DIR/build-$HOST}
|
| 93 |
|
| 94 |
BITCOIN_CONFIG_ALL="$BITCOIN_CONFIG_ALL -DCMAKE_INSTALL_PREFIX=$BASE_OUTDIR -Werror=dev"
|
|
|
|
|
|
|
|
|
|
|
|
|
| 95 |
|
| 96 |
if [[ "${RUN_IWYU}" == true || "${RUN_TIDY}" == true ]]; then
|
| 97 |
BITCOIN_CONFIG_ALL="$BITCOIN_CONFIG_ALL -DCMAKE_EXPORT_COMPILE_COMMANDS=ON"
|
|
@@ -158,6 +165,14 @@ fi
|
|
| 158 |
if [ "$RUN_FUNCTIONAL_TESTS" = "true" ]; then
|
| 159 |
# parses TEST_RUNNER_EXTRA as an array which allows for multiple arguments such as TEST_RUNNER_EXTRA='--exclude "rpc_bind.py --ipv6"'
|
| 160 |
eval "TEST_RUNNER_EXTRA=($TEST_RUNNER_EXTRA)"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 161 |
LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" \
|
| 162 |
"${BASE_BUILD_DIR}/test/functional/test_runner.py" \
|
| 163 |
"${MAKEJOBS}" \
|
|
@@ -168,6 +183,7 @@ if [ "$RUN_FUNCTIONAL_TESTS" = "true" ]; then
|
|
| 168 |
"${TEST_RUNNER_EXTRA[@]}" \
|
| 169 |
--quiet \
|
| 170 |
--failfast
|
|
|
|
| 171 |
fi
|
| 172 |
|
| 173 |
if [ "${RUN_TIDY}" = "true" ]; then
|
|
@@ -220,6 +236,7 @@ if [[ "${RUN_IWYU}" == true ]]; then
|
|
| 220 |
fi
|
| 221 |
|
| 222 |
if [ "$RUN_FUZZ_TESTS" = "true" ]; then
|
|
|
|
| 223 |
# shellcheck disable=SC2086
|
| 224 |
LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" \
|
| 225 |
"${BASE_BUILD_DIR}/test/fuzz/test_runner.py" \
|
|
@@ -228,4 +245,17 @@ if [ "$RUN_FUZZ_TESTS" = "true" ]; then
|
|
| 228 |
-l DEBUG \
|
| 229 |
"${DIR_FUZZ_IN}" \
|
| 230 |
--empty_min_time=60
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 231 |
fi
|
|
|
|
| 8 |
|
| 9 |
set -ex
|
| 10 |
|
| 11 |
+
# shellcheck source=apt.sh
|
| 12 |
+
source "$(dirname "${BASH_SOURCE[0]}")/apt.sh"
|
| 13 |
+
|
| 14 |
cd "${BASE_ROOT_DIR}"
|
| 15 |
|
| 16 |
export PATH="/path_with space:${PATH}"
|
|
|
|
| 34 |
# kernel mismatch between a cached docker image and the underlying host.
|
| 35 |
# This can happen occasionally on hosted runners if the runner image is updated.
|
| 36 |
if [[ "$CONTAINER_NAME" == "ci_native_asan" ]]; then
|
| 37 |
+
ci_retry_apt_update
|
| 38 |
${CI_RETRY_EXE} bash -c "apt-get install --no-install-recommends --no-upgrade -y $PACKAGES"
|
| 39 |
fi
|
| 40 |
|
|
|
|
| 47 |
env
|
| 48 |
echo "=== END env ==="
|
| 49 |
|
| 50 |
+
if [ "$RUN_FUZZ_TESTS" = "true" ] && [[ "${ROOTS_CI_CADENCE:-}" != fast ]]; then
|
| 51 |
export DIR_FUZZ_IN=${DIR_QA_ASSETS}/fuzz_corpora/
|
| 52 |
if [ ! -d "$DIR_FUZZ_IN" ]; then
|
| 53 |
${CI_RETRY_EXE} git clone --depth=1 https://github.com/bitcoin-core/qa-assets "${DIR_QA_ASSETS}"
|
|
|
|
| 95 |
BASE_BUILD_DIR=${BASE_BUILD_DIR:-$BASE_SCRATCH_DIR/build-$HOST}
|
| 96 |
|
| 97 |
BITCOIN_CONFIG_ALL="$BITCOIN_CONFIG_ALL -DCMAKE_INSTALL_PREFIX=$BASE_OUTDIR -Werror=dev"
|
| 98 |
+
if [[ -n "${RELEASE_TAG:-}" ]]; then
|
| 99 |
+
"${BASE_ROOT_DIR}/ci/release/validate-release-tag.sh" "$RELEASE_TAG"
|
| 100 |
+
BITCOIN_CONFIG_ALL="$BITCOIN_CONFIG_ALL -DCLIENT_VERSION_TAG=$RELEASE_TAG"
|
| 101 |
+
fi
|
| 102 |
|
| 103 |
if [[ "${RUN_IWYU}" == true || "${RUN_TIDY}" == true ]]; then
|
| 104 |
BITCOIN_CONFIG_ALL="$BITCOIN_CONFIG_ALL -DCMAKE_EXPORT_COMPILE_COMMANDS=ON"
|
|
|
|
| 165 |
if [ "$RUN_FUNCTIONAL_TESTS" = "true" ]; then
|
| 166 |
# parses TEST_RUNNER_EXTRA as an array which allows for multiple arguments such as TEST_RUNNER_EXTRA='--exclude "rpc_bind.py --ipv6"'
|
| 167 |
eval "TEST_RUNNER_EXTRA=($TEST_RUNNER_EXTRA)"
|
| 168 |
+
if [[ "${ROOTS_CI_CADENCE:-}" == fast ]]; then
|
| 169 |
+
LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" \
|
| 170 |
+
python3 "${BASE_ROOT_DIR}/ci/test/roots-regressions.py" functional --cadence fast \
|
| 171 |
+
--build-dir "$BASE_BUILD_DIR" --artifacts "${BASE_SCRATCH_DIR}/roots-failures" -- \
|
| 172 |
+
"$MAKEJOBS" --tmpdirprefix "${BASE_SCRATCH_DIR}/test_runner/" \
|
| 173 |
+
--ansi --combinedlogslen=99999999 --timeout-factor="${TEST_RUNNER_TIMEOUT_FACTOR}" \
|
| 174 |
+
"${TEST_RUNNER_EXTRA[@]}" --quiet
|
| 175 |
+
else
|
| 176 |
LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" \
|
| 177 |
"${BASE_BUILD_DIR}/test/functional/test_runner.py" \
|
| 178 |
"${MAKEJOBS}" \
|
|
|
|
| 183 |
"${TEST_RUNNER_EXTRA[@]}" \
|
| 184 |
--quiet \
|
| 185 |
--failfast
|
| 186 |
+
fi
|
| 187 |
fi
|
| 188 |
|
| 189 |
if [ "${RUN_TIDY}" = "true" ]; then
|
|
|
|
| 236 |
fi
|
| 237 |
|
| 238 |
if [ "$RUN_FUZZ_TESTS" = "true" ]; then
|
| 239 |
+
if [[ "${ROOTS_CI_CADENCE:-}" != fast ]]; then
|
| 240 |
# shellcheck disable=SC2086
|
| 241 |
LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" \
|
| 242 |
"${BASE_BUILD_DIR}/test/fuzz/test_runner.py" \
|
|
|
|
| 245 |
-l DEBUG \
|
| 246 |
"${DIR_FUZZ_IN}" \
|
| 247 |
--empty_min_time=60
|
| 248 |
+
fi
|
| 249 |
+
if [[ -n "${ROOTS_CI_CADENCE:-}" ]]; then
|
| 250 |
+
python3 "${BASE_ROOT_DIR}/ci/test/roots-regressions.py" fuzz \
|
| 251 |
+
--cadence "$ROOTS_CI_CADENCE" --build-dir "$BASE_BUILD_DIR" \
|
| 252 |
+
--artifacts "${BASE_SCRATCH_DIR}/roots-failures"
|
| 253 |
+
fi
|
| 254 |
+
fi
|
| 255 |
+
|
| 256 |
+
# Expanded dependency notice collection remains an explicitly optional tool.
|
| 257 |
+
if [[ -n "${RELEASE_NOTICE_PLATFORM:-}" ]]; then
|
| 258 |
+
cd "${BASE_ROOT_DIR}"
|
| 259 |
+
python3 ci/release/runner-notices.py "$RELEASE_NOTICE_PLATFORM" \
|
| 260 |
+
"${BASE_BUILD_DIR}/release-notices" --depends "$DEPENDS_DIR" --host "$HOST"
|
| 261 |
fi
|