Skip to content
Bitcoin Roots

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. The two line-number columns refer to before and after.

ci/test/03_test_script.sh CHANGED
@@ -8,6 +8,9 @@ export LC_ALL=C.UTF-8
8
8
 
9
9
  set -ex
10
10
 
11
+ # shellcheck source=apt.sh
12
+ source "$(dirname "${BASH_SOURCE[0]}")/apt.sh"
13
+
11
14
  cd "${BASE_ROOT_DIR}"
12
15
 
13
16
  export PATH="/path_with space:${PATH}"
@@ -31,7 +34,7 @@ df -h
31
34
  # kernel mismatch between a cached docker image and the underlying host.
32
35
  # This can happen occasionally on hosted runners if the runner image is updated.
33
36
  if [[ "$CONTAINER_NAME" == "ci_native_asan" ]]; then
34
- $CI_RETRY_EXE apt-get update
37
+ ci_retry_apt_update
35
38
  ${CI_RETRY_EXE} bash -c "apt-get install --no-install-recommends --no-upgrade -y $PACKAGES"
36
39
  fi
37
40
 
@@ -44,7 +47,7 @@ echo "=== BEGIN env ==="
44
47
  env
45
48
  echo "=== END env ==="
46
49
 
47
- if [ "$RUN_FUZZ_TESTS" = "true" ]; then
50
+ if [ "$RUN_FUZZ_TESTS" = "true" ] && [[ "${ROOTS_CI_CADENCE:-}" != fast ]]; then
48
51
  export DIR_FUZZ_IN=${DIR_QA_ASSETS}/fuzz_corpora/
49
52
  if [ ! -d "$DIR_FUZZ_IN" ]; then
50
53
  ${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
95
  BASE_BUILD_DIR=${BASE_BUILD_DIR:-$BASE_SCRATCH_DIR/build-$HOST}
93
96
 
94
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
95
102
 
96
103
  if [[ "${RUN_IWYU}" == true || "${RUN_TIDY}" == true ]]; then
97
104
  BITCOIN_CONFIG_ALL="$BITCOIN_CONFIG_ALL -DCMAKE_EXPORT_COMPILE_COMMANDS=ON"
@@ -158,6 +165,14 @@ fi
158
165
  if [ "$RUN_FUNCTIONAL_TESTS" = "true" ]; then
159
166
  # parses TEST_RUNNER_EXTRA as an array which allows for multiple arguments such as TEST_RUNNER_EXTRA='--exclude "rpc_bind.py --ipv6"'
160
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
161
176
  LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" \
162
177
  "${BASE_BUILD_DIR}/test/functional/test_runner.py" \
163
178
  "${MAKEJOBS}" \
@@ -168,6 +183,7 @@ if [ "$RUN_FUNCTIONAL_TESTS" = "true" ]; then
168
183
  "${TEST_RUNNER_EXTRA[@]}" \
169
184
  --quiet \
170
185
  --failfast
186
+ fi
171
187
  fi
172
188
 
173
189
  if [ "${RUN_TIDY}" = "true" ]; then
@@ -220,6 +236,7 @@ if [[ "${RUN_IWYU}" == true ]]; then
220
236
  fi
221
237
 
222
238
  if [ "$RUN_FUZZ_TESTS" = "true" ]; then
239
+ if [[ "${ROOTS_CI_CADENCE:-}" != fast ]]; then
223
240
  # shellcheck disable=SC2086
224
241
  LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" \
225
242
  "${BASE_BUILD_DIR}/test/fuzz/test_runner.py" \
@@ -228,4 +245,17 @@ if [ "$RUN_FUZZ_TESTS" = "true" ]; then
228
245
  -l DEBUG \
229
246
  "${DIR_FUZZ_IN}" \
230
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"
231
261
  fi