aboutsummaryrefslogtreecommitdiff
path: root/ci
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-04-29 11:14:10 -0400
committerMarcoFalke <falke.marco@gmail.com>2020-04-29 11:14:14 -0400
commitab91a0e0fc6e6be491e7df743fbfc56449ced451 (patch)
treedc842683d406e9e0c2938e5dbdb3ac7eb068373d /ci
parente302830faed00c259a517d87ce032dcd8c47528f (diff)
parent45615de26caa4c8ffeacc558143aaf6887cbb314 (diff)
downloadbitcoin-ab91a0e0fc6e6be491e7df743fbfc56449ced451.tar.xz
Merge #18798: ci: Fix default retry script usage
45615de26caa4c8ffeacc558143aaf6887cbb314 ci: Fix default retry script usage (Hennadii Stepanov) Pull request description: On master (5352d14b3796d9e672a20ada8f7613a70fe448f4) `CI_RETRY_EXE=${CI_RETRY_EXE:retry}` works as a [Substring Expansion](https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html), and that is wrong. If `CI_RETRY_EXE` variable was unset initially, its new value becomes an empty string, but not "retry" as one could expect. Consequently, the `${CI_RETRY_EXE} ...` command does _not_ use `ci/retry/retry` script. This PR makes for `CI_RETRY_EXE` variable a usual parameter expansion, i.e., `${parameter:-word}`. Reference: https://github.com/bitcoin/bitcoin/pull/18735#issuecomment-620095489 Top commit has no ACKs. Tree-SHA512: 108173f6b2677979b9ddf2f9b9df4a6c56f5efa81c36543a1816bb3b984e42984bf3c83fe413ea3a5ca1e2317c4efb02fea7180a6b44863af7cfe6202e9cf94d
Diffstat (limited to 'ci')
-rwxr-xr-xci/test/00_setup_env.sh2
-rwxr-xr-xci/test/04_install.sh1
2 files changed, 2 insertions, 1 deletions
diff --git a/ci/test/00_setup_env.sh b/ci/test/00_setup_env.sh
index 887083de1c..dae61c5e34 100755
--- a/ci/test/00_setup_env.sh
+++ b/ci/test/00_setup_env.sh
@@ -59,4 +59,4 @@ export DOCKER_PACKAGES=${DOCKER_PACKAGES:-build-essential libtool autotools-dev
export GOAL=${GOAL:-install}
export DIR_QA_ASSETS=${DIR_QA_ASSETS:-${BASE_SCRATCH_DIR}/qa-assets}
export PATH=${BASE_ROOT_DIR}/ci/retry:$PATH
-export CI_RETRY_EXE=${CI_RETRY_EXE:retry}
+export CI_RETRY_EXE=${CI_RETRY_EXE:-"retry --"}
diff --git a/ci/test/04_install.sh b/ci/test/04_install.sh
index b428a2e5b2..5dbf1b82f1 100755
--- a/ci/test/04_install.sh
+++ b/ci/test/04_install.sh
@@ -58,6 +58,7 @@ else
bash -c "export PATH=$BASE_SCRATCH_DIR/bins/:\$PATH && cd $P_CI_DIR && $*"
}
fi
+export -f DOCKER_EXEC
if [ -n "$DPKG_ADD_ARCH" ]; then
DOCKER_EXEC dpkg --add-architecture "$DPKG_ADD_ARCH"