From 6b69c6c5cf2bdc691d045f77578892b552562782 Mon Sep 17 00:00:00 2001 From: Kittywhiskers Van Gogh <63189531+kittywhiskers@users.noreply.github.com> Date: Wed, 22 Jun 2022 22:47:47 +0530 Subject: [PATCH] merge bitcoin#17367: Run non-cross-compile builds natively --- .travis.yml | 13 +++++++------ ci/dash/test_unittests.sh | 1 + ci/test/00_setup_env.sh | 5 ++++- ...nv_amd64_asan.sh => 00_setup_env_native_asan.sh} | 1 - ...nv_amd64_fuzz.sh => 00_setup_env_native_fuzz.sh} | 1 - ..._nowallet.sh => 00_setup_env_native_nowallet.sh} | 1 - ..._env_amd64_qt5.sh => 00_setup_env_native_qt5.sh} | 1 - ...md64_trusty.sh => 00_setup_env_native_trusty.sh} | 1 - ...nv_amd64_tsan.sh => 00_setup_env_native_tsan.sh} | 1 - 9 files changed, 12 insertions(+), 13 deletions(-) rename ci/test/{00_setup_env_amd64_asan.sh => 00_setup_env_native_asan.sh} (95%) rename ci/test/{00_setup_env_amd64_fuzz.sh => 00_setup_env_native_fuzz.sh} (94%) rename ci/test/{00_setup_env_amd64_nowallet.sh => 00_setup_env_native_nowallet.sh} (91%) rename ci/test/{00_setup_env_amd64_qt5.sh => 00_setup_env_native_qt5.sh} (95%) rename ci/test/{00_setup_env_amd64_trusty.sh => 00_setup_env_native_trusty.sh} (94%) rename ci/test/{00_setup_env_amd64_tsan.sh => 00_setup_env_native_tsan.sh} (95%) diff --git a/.travis.yml b/.travis.yml index 1bb02b3fe4..17b8773ae2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,7 @@ dist: xenial os: linux language: minimal +arch: amd64 services: - docker @@ -235,30 +236,30 @@ after_success: - stage: test name: 'x86_64 Linux [GOAL: install] [bionic] [uses qt5 dev package instead of depends Qt to speed up build and avoid timeout] [unsigned char]' env: >- - FILE_ENV="./ci/test/00_setup_env_amd64_qt5.sh" + FILE_ENV="./ci/test/00_setup_env_native_qt5.sh" # x86_64 Linux (xenial, no depends, only system libs, sanitizers: thread (TSan)) - stage: test name: 'x86_64 Linux [GOAL: install] [trusty] [no functional tests, no depends, only system libs]' env: >- - FILE_ENV="./ci/test/00_setup_env_amd64_trusty.sh" + FILE_ENV="./ci/test/00_setup_env_native_trusty.sh" - stage: test name: 'x86_64 Linux [GOAL: install] [xenial] [no depends, only system libs, sanitizers: thread (TSan), no wallet]' env: >- - FILE_ENV="./ci/test/00_setup_env_amd64_tsan.sh" + FILE_ENV="./ci/test/00_setup_env_native_tsan.sh" # x86_64 Linux (no depends, only system libs, sanitizers: address/leak (ASan + LSan) + undefined (UBSan) + integer) - stage: test name: 'x86_64 Linux [GOAL: install] [bionic] [no depends, only system libs, sanitizers: address/leak (ASan + LSan) + undefined (UBSan) + integer]' env: >- - FILE_ENV="./ci/test/00_setup_env_amd64_asan.sh" + FILE_ENV="./ci/test/00_setup_env_native_asan.sh" - stage: test name: 'x86_64 Linux [GOAL: install] [bionic] [no wallet]' env: >- - FILE_ENV="./ci/test/00_setup_env_amd64_fuzz.sh" + FILE_ENV="./ci/test/00_setup_env_native_fuzz.sh" - stage: test env: >- - FILE_ENV="./ci/test/00_setup_env_amd64_nowallet.sh" + FILE_ENV="./ci/test/00_setup_env_native_nowallet.sh" - stage: test name: 'macOS 10.12 [GOAL: deploy] [no functional tests]' diff --git a/ci/dash/test_unittests.sh b/ci/dash/test_unittests.sh index 05f4945613..6d68310a38 100755 --- a/ci/dash/test_unittests.sh +++ b/ci/dash/test_unittests.sh @@ -22,6 +22,7 @@ export BOOST_TEST_LOG_LEVEL=test_suite cd build-ci/dashcore-$BUILD_TARGET +bash -c "${CI_WAIT}" & # Print dots in case the unit tests take a long time to run if [ "$DIRECT_WINE_EXEC_TESTS" = "true" ]; then # Inside Docker, binfmt isn't working so we can't trust in make invoking windows binaries correctly wine ./src/test/test_dash.exe diff --git a/ci/test/00_setup_env.sh b/ci/test/00_setup_env.sh index 378dfa4fce..f59a8320cc 100755 --- a/ci/test/00_setup_env.sh +++ b/ci/test/00_setup_env.sh @@ -21,7 +21,10 @@ echo "Fallback to default values in env (if not yet set)" export MAKEJOBS=${MAKEJOBS:--j4} # A folder for the ci system to put temporary files (ccache, datadirs for tests, ...) export BASE_SCRATCH_DIR=${BASE_SCRATCH_DIR:-$BASE_ROOT_DIR/ci/scratch/} -export HOST=${HOST:-x86_64-unknown-linux-gnu} +# What host to compile for. See also ./depends/README.md +# Tests that need cross-compilation export the appropriate HOST. +# Tests that run natively guess the host +export HOST=${HOST:-$("$BASE_ROOT_DIR/depends/config.guess")} # Whether to prefer BusyBox over GNU utilities export USE_BUSY_BOX=${USE_BUSY_BOX:-false} export RUN_UNIT_TESTS=${RUN_UNIT_TESTS:-true} diff --git a/ci/test/00_setup_env_amd64_asan.sh b/ci/test/00_setup_env_native_asan.sh similarity index 95% rename from ci/test/00_setup_env_amd64_asan.sh rename to ci/test/00_setup_env_native_asan.sh index e7ef1564aa..0e15669347 100644 --- a/ci/test/00_setup_env_amd64_asan.sh +++ b/ci/test/00_setup_env_native_asan.sh @@ -6,7 +6,6 @@ export LC_ALL=C.UTF-8 -export HOST=x86_64-unknown-linux-gnu export PACKAGES="clang llvm python3-zmq qtbase5-dev qttools5-dev-tools libevent-dev bsdmainutils libboost-filesystem-dev libboost-test-dev libboost-thread-dev libdb5.3++-dev libminiupnpc-dev libzmq3-dev libqrencode-dev" export NO_DEPENDS=1 export FUNCTIONAL_TESTS_CONFIG="--exclude wallet_multiwallet.py" # Temporarily suppress ASan heap-use-after-free (see issue #14163) diff --git a/ci/test/00_setup_env_amd64_fuzz.sh b/ci/test/00_setup_env_native_fuzz.sh similarity index 94% rename from ci/test/00_setup_env_amd64_fuzz.sh rename to ci/test/00_setup_env_native_fuzz.sh index 933f724803..3ead892d4c 100644 --- a/ci/test/00_setup_env_amd64_fuzz.sh +++ b/ci/test/00_setup_env_native_fuzz.sh @@ -6,7 +6,6 @@ export LC_ALL=C.UTF-8 -export HOST=x86_64-unknown-linux-gnu export PACKAGES="clang llvm python3 libevent-dev bsdmainutils libboost-filesystem-dev libboost-test-dev libboost-thread-dev" export NO_DEPENDS=1 export RUN_UNIT_TESTS=false diff --git a/ci/test/00_setup_env_amd64_nowallet.sh b/ci/test/00_setup_env_native_nowallet.sh similarity index 91% rename from ci/test/00_setup_env_amd64_nowallet.sh rename to ci/test/00_setup_env_native_nowallet.sh index d5a2ba3111..53348559be 100644 --- a/ci/test/00_setup_env_amd64_nowallet.sh +++ b/ci/test/00_setup_env_native_nowallet.sh @@ -6,7 +6,6 @@ export LC_ALL=C.UTF-8 -export HOST=x86_64-unknown-linux-gnu export PACKAGES="python3-zmq" export DEP_OPTS="NO_WALLET=1" export GOAL="install" diff --git a/ci/test/00_setup_env_amd64_qt5.sh b/ci/test/00_setup_env_native_qt5.sh similarity index 95% rename from ci/test/00_setup_env_amd64_qt5.sh rename to ci/test/00_setup_env_native_qt5.sh index 55820ea835..622ec3cfe1 100644 --- a/ci/test/00_setup_env_amd64_qt5.sh +++ b/ci/test/00_setup_env_native_qt5.sh @@ -6,7 +6,6 @@ export LC_ALL=C.UTF-8 -export HOST=x86_64-unknown-linux-gnu export PACKAGES="python3-zmq qtbase5-dev qttools5-dev-tools libdbus-1-dev libharfbuzz-dev" export DEP_OPTS="NO_QT=1 NO_UPNP=1 DEBUG=1 ALLOW_HOST_PACKAGES=1" export TEST_RUNNER_EXTRA="--coverage --extended --exclude feature_dbcrash" # Run extended tests so that coverage does not fail, but exclude the very slow dbcrash diff --git a/ci/test/00_setup_env_amd64_trusty.sh b/ci/test/00_setup_env_native_trusty.sh similarity index 94% rename from ci/test/00_setup_env_amd64_trusty.sh rename to ci/test/00_setup_env_native_trusty.sh index fd6f4b6815..d07d7fb958 100644 --- a/ci/test/00_setup_env_amd64_trusty.sh +++ b/ci/test/00_setup_env_native_trusty.sh @@ -6,7 +6,6 @@ export LC_ALL=C.UTF-8 -export HOST=x86_64-unknown-linux-gnu export DOCKER_NAME_TAG=ubuntu:14.04 export PACKAGES="python3-zmq qtbase5-dev qttools5-dev-tools libicu-dev libpng-dev libevent-dev bsdmainutils libboost-filesystem-dev libboost-test-dev libboost-thread-dev libdb5.1++-dev libminiupnpc-dev libzmq3-dev libqrencode-dev" export RUN_FUNCTIONAL_TESTS=false diff --git a/ci/test/00_setup_env_amd64_tsan.sh b/ci/test/00_setup_env_native_tsan.sh similarity index 95% rename from ci/test/00_setup_env_amd64_tsan.sh rename to ci/test/00_setup_env_native_tsan.sh index e22abab7d7..97e74d6e3d 100644 --- a/ci/test/00_setup_env_amd64_tsan.sh +++ b/ci/test/00_setup_env_native_tsan.sh @@ -6,7 +6,6 @@ export LC_ALL=C.UTF-8 -export HOST=x86_64-unknown-linux-gnu export DOCKER_NAME_TAG=ubuntu:16.04 export PACKAGES="clang llvm python3-zmq qtbase5-dev qttools5-dev-tools libevent-dev bsdmainutils libboost-filesystem-dev libboost-test-dev libboost-thread-dev libdb5.3++-dev libminiupnpc-dev libzmq3-dev libqrencode-dev" export NO_DEPENDS=1