Skip to content

Commit facc0da

Browse files
author
MarcoFalke
committed
travis: Run unit and functional tests on native arm
1 parent fafa064 commit facc0da

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

.travis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,11 @@ jobs:
9494
- set -o errexit; source ./ci/extended_lint/06_script.sh
9595

9696
- stage: test
97-
name: 'ARM [GOAL: install] [unit tests, no functional tests]'
97+
name: 'ARM [GOAL: install] [unit tests, functional tests]'
98+
arch: arm64
9899
env: >-
99100
FILE_ENV="./ci/test/00_setup_env_arm.sh"
101+
QEMU_USER_CMD="" # Can run the tests natively without qemu
100102
101103
- stage: test
102104
name: 'Win64 [GOAL: deploy] [unit tests, no gui, no functional tests]'

ci/test/00_setup_env_arm.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,16 @@
77
export LC_ALL=C.UTF-8
88

99
export HOST=arm-linux-gnueabihf
10-
export QEMU_USER_CMD="qemu-arm -L /usr/arm-linux-gnueabihf/"
11-
export PACKAGES="python3 g++-arm-linux-gnueabihf busybox qemu-user"
10+
# The host arch is unknown, so we run the tests through qemu.
11+
# If the host is arm and wants to run the tests natively, it can set QEMU_USER_CMD to the empty string.
12+
export QEMU_USER_CMD="${QEMU_USER_CMD:"qemu-arm -L /usr/arm-linux-gnueabihf/"}"
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.
15+
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"
1217
export USE_BUSY_BOX=true
1318
export RUN_UNIT_TESTS=true
14-
export RUN_FUNCTIONAL_TESTS=false
19+
export RUN_FUNCTIONAL_TESTS=true
1520
export GOAL="install"
1621
# -Wno-psabi is to disable ABI warnings: "note: parameter passing for argument of type ... changed in GCC 7.1"
1722
# This could be removed once the ABI change warning does not show up by default

ci/test/04_install.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ else
7676
DOCKER_EXEC echo "Number of CPUs \(nproc\):" \$\(nproc\)
7777
fi
7878

79+
if [ -n "$DPKG_ADD_ARCH" ]; then
80+
DOCKER_EXEC dpkg --add-architecture "$DPKG_ADD_ARCH"
81+
fi
7982

8083
if [ "$TRAVIS_OS_NAME" != "osx" ]; then
8184
${CI_RETRY_EXE} DOCKER_EXEC apt-get update

0 commit comments

Comments
 (0)