55
55
echo " Running on host system without docker wrapper"
56
56
fi
57
57
58
- DOCKER_EXEC () {
58
+ CI_EXEC () {
59
59
$DOCKER_CI_CMD_PREFIX bash -c " export PATH=$BASE_SCRATCH_DIR /bins/:\$ PATH && cd \" $P_CI_DIR \" && $* "
60
60
}
61
- export -f DOCKER_EXEC
61
+ export -f CI_EXEC
62
62
63
63
if [ -n " $DPKG_ADD_ARCH " ]; then
64
- DOCKER_EXEC dpkg --add-architecture " $DPKG_ADD_ARCH "
64
+ CI_EXEC dpkg --add-architecture " $DPKG_ADD_ARCH "
65
65
fi
66
66
67
67
if [[ $DOCKER_NAME_TAG == * centos* ]]; then
68
- ${CI_RETRY_EXE} DOCKER_EXEC dnf -y install epel-release
69
- ${CI_RETRY_EXE} DOCKER_EXEC dnf -y --allowerasing install " $DOCKER_PACKAGES " " $PACKAGES "
68
+ ${CI_RETRY_EXE} CI_EXEC dnf -y install epel-release
69
+ ${CI_RETRY_EXE} CI_EXEC dnf -y --allowerasing install " $DOCKER_PACKAGES " " $PACKAGES "
70
70
elif [ " $CI_USE_APT_INSTALL " != " no" ]; then
71
- ${CI_RETRY_EXE} DOCKER_EXEC apt-get update
72
- ${CI_RETRY_EXE} DOCKER_EXEC apt-get install --no-install-recommends --no-upgrade -y " $PACKAGES " " $DOCKER_PACKAGES "
71
+ ${CI_RETRY_EXE} CI_EXEC apt-get update
72
+ ${CI_RETRY_EXE} CI_EXEC apt-get install --no-install-recommends --no-upgrade -y " $PACKAGES " " $DOCKER_PACKAGES "
73
73
if [ -n " $PIP_PACKAGES " ]; then
74
74
# shellcheck disable=SC2086
75
75
${CI_RETRY_EXE} pip3 install --user $PIP_PACKAGES
@@ -80,50 +80,50 @@ if [ "$CI_OS_NAME" == "macos" ]; then
80
80
top -l 1 -s 0 | awk ' /PhysMem/ {print}'
81
81
echo " Number of CPUs: $( sysctl -n hw.logicalcpu) "
82
82
else
83
- DOCKER_EXEC free -m -h
84
- DOCKER_EXEC echo " Number of CPUs \(nproc\):" \$\( nproc\)
85
- DOCKER_EXEC echo " $( lscpu | grep Endian) "
83
+ CI_EXEC free -m -h
84
+ CI_EXEC echo " Number of CPUs \(nproc\):" \$\( nproc\)
85
+ CI_EXEC echo " $( lscpu | grep Endian) "
86
86
fi
87
- DOCKER_EXEC echo " Free disk space:"
88
- DOCKER_EXEC df -h
87
+ CI_EXEC echo " Free disk space:"
88
+ CI_EXEC df -h
89
89
90
90
if [ " $RUN_FUZZ_TESTS " = " true" ]; then
91
91
export DIR_FUZZ_IN=${DIR_QA_ASSETS} /fuzz_seed_corpus/
92
92
if [ ! -d " $DIR_FUZZ_IN " ]; then
93
- DOCKER_EXEC git clone --depth=1 https://github.com/bitcoin-core/qa-assets " ${DIR_QA_ASSETS} "
93
+ CI_EXEC git clone --depth=1 https://github.com/bitcoin-core/qa-assets " ${DIR_QA_ASSETS} "
94
94
fi
95
95
elif [ " $RUN_UNIT_TESTS " = " true" ] || [ " $RUN_UNIT_TESTS_SEQUENTIAL " = " true" ]; then
96
96
export DIR_UNIT_TEST_DATA=${DIR_QA_ASSETS} /unit_test_data/
97
97
if [ ! -d " $DIR_UNIT_TEST_DATA " ]; then
98
- DOCKER_EXEC mkdir -p " $DIR_UNIT_TEST_DATA "
99
- DOCKER_EXEC curl --location --fail https://github.com/bitcoin-core/qa-assets/raw/main/unit_test_data/script_assets_test.json -o " ${DIR_UNIT_TEST_DATA} /script_assets_test.json"
98
+ CI_EXEC mkdir -p " $DIR_UNIT_TEST_DATA "
99
+ CI_EXEC curl --location --fail https://github.com/bitcoin-core/qa-assets/raw/main/unit_test_data/script_assets_test.json -o " ${DIR_UNIT_TEST_DATA} /script_assets_test.json"
100
100
fi
101
101
fi
102
102
103
- DOCKER_EXEC mkdir -p " ${BASE_SCRATCH_DIR} /sanitizer-output/"
103
+ CI_EXEC mkdir -p " ${BASE_SCRATCH_DIR} /sanitizer-output/"
104
104
105
105
if [[ ${USE_MEMORY_SANITIZER} == " true" ]]; then
106
- DOCKER_EXEC " update-alternatives --install /usr/bin/clang++ clang++ \$ (which clang++-9) 100"
107
- DOCKER_EXEC " update-alternatives --install /usr/bin/clang clang \$ (which clang-9) 100"
108
- DOCKER_EXEC " mkdir -p ${BASE_SCRATCH_DIR} /msan/build/"
109
- DOCKER_EXEC " git clone --depth=1 https://github.com/llvm/llvm-project -b llvmorg-12.0.0 ${BASE_SCRATCH_DIR} /msan/llvm-project"
110
- DOCKER_EXEC " cd ${BASE_SCRATCH_DIR} /msan/build/ && cmake -DLLVM_ENABLE_PROJECTS='libcxx;libcxxabi' -DCMAKE_BUILD_TYPE=Release -DLLVM_USE_SANITIZER=Memory -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DLLVM_TARGETS_TO_BUILD=X86 ../llvm-project/llvm/"
111
- DOCKER_EXEC " cd ${BASE_SCRATCH_DIR} /msan/build/ && make $MAKEJOBS cxx"
106
+ CI_EXEC " update-alternatives --install /usr/bin/clang++ clang++ \$ (which clang++-9) 100"
107
+ CI_EXEC " update-alternatives --install /usr/bin/clang clang \$ (which clang-9) 100"
108
+ CI_EXEC " mkdir -p ${BASE_SCRATCH_DIR} /msan/build/"
109
+ CI_EXEC " git clone --depth=1 https://github.com/llvm/llvm-project -b llvmorg-12.0.0 ${BASE_SCRATCH_DIR} /msan/llvm-project"
110
+ CI_EXEC " cd ${BASE_SCRATCH_DIR} /msan/build/ && cmake -DLLVM_ENABLE_PROJECTS='libcxx;libcxxabi' -DCMAKE_BUILD_TYPE=Release -DLLVM_USE_SANITIZER=Memory -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DLLVM_TARGETS_TO_BUILD=X86 ../llvm-project/llvm/"
111
+ CI_EXEC " cd ${BASE_SCRATCH_DIR} /msan/build/ && make $MAKEJOBS cxx"
112
112
fi
113
113
114
114
if [ -z " $DANGER_RUN_CI_ON_HOST " ]; then
115
115
echo " Create $BASE_ROOT_DIR "
116
- DOCKER_EXEC rsync -a /ro_base/ " $BASE_ROOT_DIR "
116
+ CI_EXEC rsync -a /ro_base/ " $BASE_ROOT_DIR "
117
117
fi
118
118
119
119
if [ " $USE_BUSY_BOX " = " true" ]; then
120
120
echo " Setup to use BusyBox utils"
121
- DOCKER_EXEC mkdir -p " ${BASE_SCRATCH_DIR} /bins/"
121
+ CI_EXEC mkdir -p " ${BASE_SCRATCH_DIR} /bins/"
122
122
# tar excluded for now because it requires passing in the exact archive type in ./depends (fixed in later BusyBox version)
123
123
# find excluded for now because it does not recognize the -delete option in ./depends (fixed in later BusyBox version)
124
124
# ar excluded for now because it does not recognize the -q option in ./depends (unknown if fixed)
125
125
# shellcheck disable=SC1010
126
- DOCKER_EXEC for util in \$\( busybox --list \| grep -v " ^ar$" \| grep -v " ^tar$" \| grep -v " ^find$" \)\; do ln -s \$\( command -v busybox\) " ${BASE_SCRATCH_DIR} /bins/\$ util" \; done
126
+ CI_EXEC for util in \$\( busybox --list \| grep -v " ^ar$" \| grep -v " ^tar$" \| grep -v " ^find$" \)\; do ln -s \$\( command -v busybox\) " ${BASE_SCRATCH_DIR} /bins/\$ util" \; done
127
127
# Print BusyBox version
128
- DOCKER_EXEC patch --help
128
+ CI_EXEC patch --help
129
129
fi
0 commit comments