Skip to content

Commit fa00393

Browse files
author
MarcoFalke
committed
ci: Make all filesystem operations inside docker
1 parent 8021392 commit fa00393

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

ci/test/04_install.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ if [ ! -d ${DIR_QA_ASSETS} ]; then
4040
fi
4141
export DIR_FUZZ_IN=${DIR_QA_ASSETS}/fuzz_seed_corpus/
4242

43-
mkdir -p "${BASE_BUILD_DIR}/sanitizer-output/"
4443
export ASAN_OPTIONS="detect_stack_use_after_return=1"
4544
export LSAN_OPTIONS="suppressions=${BASE_BUILD_DIR}/test/sanitizer_suppressions/lsan"
4645
export TSAN_OPTIONS="suppressions=${BASE_BUILD_DIR}/test/sanitizer_suppressions/tsan:log_path=${BASE_BUILD_DIR}/sanitizer-output/tsan"
@@ -85,6 +84,8 @@ if [ "$TRAVIS_OS_NAME" != "osx" ]; then
8584
${CI_RETRY_EXE} DOCKER_EXEC apt-get install --no-install-recommends --no-upgrade -y $PACKAGES $DOCKER_PACKAGES
8685
fi
8786

87+
DOCKER_EXEC mkdir -p "${BASE_BUILD_DIR}/sanitizer-output/"
88+
8889
if [ "$USE_BUSY_BOX" = "true" ]; then
8990
echo "Setup to use BusyBox utils"
9091
DOCKER_EXEC mkdir -p $BASE_SCRATCH_DIR/bins/

ci/test/05_before_script.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ else
1313
DOCKER_EXEC echo \> \$HOME/.bitcoin
1414
fi
1515

16-
mkdir -p depends/SDKs depends/sdk-sources
16+
DOCKER_EXEC mkdir -p depends/SDKs depends/sdk-sources
1717

1818
if [ -n "$OSX_SDK" ] && [ ! -f depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz ]; then
1919
curl --location --fail $SDK_URL/MacOSX${OSX_SDK}.sdk.tar.gz -o depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz
2020
fi
2121
if [ -n "$OSX_SDK" ] && [ -f depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz ]; then
22-
tar -C depends/SDKs -xf depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz
22+
DOCKER_EXEC tar -C depends/SDKs -xf depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz
2323
fi
2424
if [[ $HOST = *-mingw32 ]]; then
2525
DOCKER_EXEC update-alternatives --set $HOST-g++ \$\(which $HOST-g++-posix\)

ci/test/06_script_a.sh

+6-2
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,22 @@ else
1919
fi
2020
END_FOLD
2121

22+
# Create folder on host and docker, so that `cd` works
2223
mkdir -p build
24+
DOCKER_EXEC mkdir -p build
2325

2426
# Temporarily disable errexit, because Travis macOS fails without error message
2527
set +o errexit
2628
cd build || (echo "could not enter build directory"; exit 1)
2729
set -o errexit
2830

2931
BEGIN_FOLD configure
30-
DOCKER_EXEC ../configure --cache-file=config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false)
32+
DOCKER_EXEC ../configure --cache-file=config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( (DOCKER_EXEC cat config.log) && false)
3133
END_FOLD
3234

3335
BEGIN_FOLD distdir
36+
# Create folder on host and docker, so that `cd` works
37+
mkdir -p "bitcoin-$HOST"
3438
DOCKER_EXEC make distdir VERSION=$HOST
3539
END_FOLD
3640

@@ -39,7 +43,7 @@ cd "bitcoin-$HOST" || (echo "could not enter distdir bitcoin-$HOST"; exit 1)
3943
set -o errexit
4044

4145
BEGIN_FOLD configure
42-
DOCKER_EXEC ./configure --cache-file=../config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false)
46+
DOCKER_EXEC ./configure --cache-file=../config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( (DOCKER_EXEC cat config.log) && false)
4347
END_FOLD
4448

4549
set -o errtrace

ci/test/06_script_b.sh

-4
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,3 @@ if [ "$RUN_FUZZ_TESTS" = "true" ]; then
4848
DOCKER_EXEC test/fuzz/test_runner.py -l DEBUG ${DIR_FUZZ_IN}
4949
END_FOLD
5050
fi
51-
52-
set +o errexit
53-
cd ${BASE_BUILD_DIR} || (echo "could not enter travis build dir $BASE_BUILD_DIR"; exit 1)
54-
set -o errexit

0 commit comments

Comments
 (0)