aboutsummaryrefslogtreecommitdiff
path: root/ci/test/00_setup_env_s390x.sh
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@protonmail.com>2020-01-22 21:09:07 +0100
committerWladimir J. van der Laan <laanwj@protonmail.com>2020-01-22 21:09:13 +0100
commit4a072330763b3ff2d1b5c5b8d30a9517873ac6de (patch)
tree47b31a8fef2db4bbef53c20558b763ca2fb7c100 /ci/test/00_setup_env_s390x.sh
parenta3d198c93cbed085e5327d99a4fd635e9a8e6b35 (diff)
parentfa569e1a9c5ad1bf8bdf866235b21aff56112224 (diff)
downloadbitcoin-4a072330763b3ff2d1b5c5b8d30a9517873ac6de.tar.xz
Merge #17767: ci: Fix qemu issues
fa569e1a9c5ad1bf8bdf866235b21aff56112224 ci: Set LC_ALL=C when running in qemu-s390x (MarcoFalke) fa3d77623ecb25dde6b5f4be11626ed16966eb29 ci: Use debian to avoid apt install 404 errors (MarcoFalke) fabb946090be2f604da3d7d4b1bbe93b79baf23e ci: Install needed gcc and qemu-user iff cross-compiling (MarcoFalke) faba4672b64fb5ba89e5cb6299479887494b571a ci: Fix QEMU_USER_CMD parse issues (MarcoFalke) fa5d709fb266c97d4db15006bf855e887a6c123b ci: Move wrap-qemu into separate script (MarcoFalke) Pull request description: Now that the ci system no longer propagates files from the docker container back to the host, the wrap-qemu script is broken. To fix it, every statement in the script needs to be executed in the docker (with `DOCKER_EXEC`). Instead of juggling with triple escape sequences like `\\\"`, just move the script to a separate file and call it with `DOCKER_EXEC`. Also, fix a bunch of other bugs that prevent running the ci system in qemu See the `ci/README.md` on how to test. TLDR: Can be tested with (replace `arm` with `s390x` to run the s390x build): ``` FILE_ENV="./ci/test/00_setup_env_arm.sh" MAKEJOBS="-j9" ./ci/test_run_all.sh ``` ACKs for top commit: laanwj: Code review ACK fa569e1a9c5ad1bf8bdf866235b21aff56112224 Tree-SHA512: 84ebc44a4f0261ee6c29605a6896a1833ff6c81d729e6d08dd111941f570ce73221422bd3303e1108a266ec5eab2148bd5ee1cf6bc01477d8cc9a6c5bf2b34c2
Diffstat (limited to 'ci/test/00_setup_env_s390x.sh')
-rw-r--r--ci/test/00_setup_env_s390x.sh11
1 files changed, 9 insertions, 2 deletions
diff --git a/ci/test/00_setup_env_s390x.sh b/ci/test/00_setup_env_s390x.sh
index 637d549553..6452feb5f2 100644
--- a/ci/test/00_setup_env_s390x.sh
+++ b/ci/test/00_setup_env_s390x.sh
@@ -9,8 +9,15 @@ export LC_ALL=C.UTF-8
export HOST=s390x-linux-gnu
# The host arch is unknown, so we run the tests through qemu.
# If the host is s390x and wants to run the tests natively, it can set QEMU_USER_CMD to the empty string.
-export QEMU_USER_CMD="${QEMU_USER_CMD:"qemu-s390x"}"
-export PACKAGES="python3-zmq bsdmainutils qemu-user"
+if [ -z ${QEMU_USER_CMD+x} ]; then export QEMU_USER_CMD="${QEMU_USER_CMD:-"qemu-s390x"}"; fi
+export PACKAGES="python3-zmq"
+if [ -n "$QEMU_USER_CMD" ]; then
+ # Likely cross-compiling, so install the needed gcc and qemu-user
+ export DPKG_ADD_ARCH="s390x"
+ export PACKAGES="$PACKAGES g++-s390x-linux-gnu qemu-user libc6:s390x libstdc++6:s390x libfontconfig1:s390x libxcb1:s390x"
+fi
+# Use debian to avoid 404 apt errors
+export DOCKER_NAME_TAG="debian:buster"
export RUN_UNIT_TESTS=true
export RUN_FUNCTIONAL_TESTS=true
export GOAL="install"