Skip to content

Commit fabb946

Browse files
author
MarcoFalke
committed
ci: Install needed gcc and qemu-user iff cross-compiling
1 parent faba467 commit fabb946

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

ci/test/00_setup_env_arm.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@ export HOST=arm-linux-gnueabihf
1010
# The host arch is unknown, so we run the tests through qemu.
1111
# If the host is arm and wants to run the tests natively, it can set QEMU_USER_CMD to the empty string.
1212
if [ -z ${QEMU_USER_CMD+x} ]; then export QEMU_USER_CMD="${QEMU_USER_CMD:-"qemu-arm -L /usr/arm-linux-gnueabihf/"}"; fi
13-
# We don't know whether the host can run the cross compiled binaries. To run them, either qemu-user or libc6:armhf for
14-
# the target is required, so install both.
1513
export DPKG_ADD_ARCH="armhf"
16-
export PACKAGES="python3 g++-arm-linux-gnueabihf busybox qemu-user libc6:armhf libstdc++6:armhf libfontconfig1:armhf libxcb1:armhf"
14+
export PACKAGES="python3-zmq g++-arm-linux-gnueabihf busybox libc6:armhf libstdc++6:armhf libfontconfig1:armhf libxcb1:armhf"
15+
if [ -n "$QEMU_USER_CMD" ]; then
16+
# Likely cross-compiling, so install the needed gcc and qemu-user
17+
export PACKAGES="$PACKAGES qemu-user"
18+
fi
1719
export USE_BUSY_BOX=true
1820
export RUN_UNIT_TESTS=true
1921
export RUN_FUNCTIONAL_TESTS=true

ci/test/00_setup_env_s390x.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@ export HOST=s390x-linux-gnu
1010
# The host arch is unknown, so we run the tests through qemu.
1111
# If the host is s390x and wants to run the tests natively, it can set QEMU_USER_CMD to the empty string.
1212
if [ -z ${QEMU_USER_CMD+x} ]; then export QEMU_USER_CMD="${QEMU_USER_CMD:-"qemu-s390x"}"; fi
13-
export PACKAGES="python3-zmq bsdmainutils qemu-user"
13+
export PACKAGES="python3-zmq"
14+
if [ -n "$QEMU_USER_CMD" ]; then
15+
# Likely cross-compiling, so install the needed gcc and qemu-user
16+
export DPKG_ADD_ARCH="s390x"
17+
export PACKAGES="$PACKAGES g++-s390x-linux-gnu qemu-user libc6:s390x libstdc++6:s390x libfontconfig1:s390x libxcb1:s390x"
18+
fi
1419
export RUN_UNIT_TESTS=true
1520
export RUN_FUNCTIONAL_TESTS=true
1621
export GOAL="install"

0 commit comments

Comments
 (0)