From fa7a87bc7c3468024c6aa05cda23c575b1cf707a Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Wed, 24 May 2023 14:52:11 +0200 Subject: [PATCH 1/3] ci: Add missing set -e to 01_base_install.sh Also, set -x for easier debugging. Also, do the same for ci/test/00_setup_env.sh --- ci/test/00_setup_env.sh | 2 ++ ci/test/01_base_install.sh | 2 ++ 2 files changed, 4 insertions(+) diff --git a/ci/test/00_setup_env.sh b/ci/test/00_setup_env.sh index d98f05ca6bc..532c8280bab 100755 --- a/ci/test/00_setup_env.sh +++ b/ci/test/00_setup_env.sh @@ -6,6 +6,8 @@ export LC_ALL=C.UTF-8 +set -ex + # The root dir. # The ci system copies this folder. BASE_ROOT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )"/../../ >/dev/null 2>&1 && pwd ) diff --git a/ci/test/01_base_install.sh b/ci/test/01_base_install.sh index beb5aa92426..98f96f0ece6 100755 --- a/ci/test/01_base_install.sh +++ b/ci/test/01_base_install.sh @@ -6,6 +6,8 @@ export LC_ALL=C.UTF-8 +set -ex + CFG_DONE="ci.base-install-done" # Use a global git setting to remember whether this script ran to avoid running it twice if [ "$(git config --global ${CFG_DONE})" == "true" ]; then From aaaa4326035c889a7be59cfe738986ae5581d5ac Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Wed, 24 May 2023 15:09:13 +0200 Subject: [PATCH 2/3] ci: Remove "default" test env It is unclear what the point is of maintaining a "default", the meaning of which is unclear. --- ci/README.md | 6 ------ ci/test/00_setup_env.sh | 2 -- 2 files changed, 8 deletions(-) diff --git a/ci/README.md b/ci/README.md index d014565f447..b4158d01832 100644 --- a/ci/README.md +++ b/ci/README.md @@ -20,12 +20,6 @@ requires `bash`, `docker`, and `python3` to be installed. To install all require sudo apt install bash docker.io python3 ``` -To run the default test stage, - -``` -./ci/test_run_all.sh -``` - To run the test stage with a specific configuration, ``` diff --git a/ci/test/00_setup_env.sh b/ci/test/00_setup_env.sh index 532c8280bab..69fd05051ed 100755 --- a/ci/test/00_setup_env.sh +++ b/ci/test/00_setup_env.sh @@ -46,8 +46,6 @@ export TEST_RUNNER_TIMEOUT_FACTOR=${TEST_RUNNER_TIMEOUT_FACTOR:-40} export TEST_RUNNER_ENV=${TEST_RUNNER_ENV:-} export RUN_FUZZ_TESTS=${RUN_FUZZ_TESTS:-false} -export CONTAINER_NAME=${CONTAINER_NAME:-ci_unnamed} -export CI_IMAGE_NAME_TAG=${CI_IMAGE_NAME_TAG:-ubuntu:20.04} # Randomize test order. # See https://www.boost.org/doc/libs/1_71_0/libs/test/doc/html/boost_test/utf_reference/rt_param_reference/random.html export BOOST_TEST_RANDOM=${BOOST_TEST_RANDOM:-1} From fa12558d21aa03c22407a1458a0345d8a7ab6a4b Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Fri, 26 May 2023 17:09:07 +0200 Subject: [PATCH 3/3] ci: Avoid leaking HOME var into CI pod This will lead to a duplicate install, see https://github.com/bitcoin/bitcoin/pull/27739#issuecomment-1564122573 --- ci/test/04_install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/test/04_install.sh b/ci/test/04_install.sh index e9c54139a70..09d68ee0639 100755 --- a/ci/test/04_install.sh +++ b/ci/test/04_install.sh @@ -28,7 +28,7 @@ export BINS_SCRATCH_DIR="${BASE_SCRATCH_DIR}/bins/" if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then # Export all env vars to avoid missing some. # Though, exclude those with newlines to avoid parsing problems. - python3 -c 'import os; [print(f"{key}={value}") for key, value in os.environ.items() if "\n" not in value]' | tee /tmp/env + python3 -c 'import os; [print(f"{key}={value}") for key, value in os.environ.items() if "\n" not in value and "HOME" not in key]' | tee /tmp/env echo "Creating $CI_IMAGE_NAME_TAG container to run in" DOCKER_BUILDKIT=1 ${CI_RETRY_EXE} docker build \ --file "${BASE_ROOT_DIR}/ci/test_imagefile" \