Skip to content

Commit 1c11e53

Browse files
committed
Merge #17041: ci: Run tests on arm
fa79dff ci: Run tests on arm (MarcoFalke) Pull request description: Closes #16576 ACKs for top commit: laanwj: ACK fa79dff fanquake: ACK fa79dff - assuming Travis is green again. Tree-SHA512: c430db9852632567c6836981fb3c5922ccd7d3b6ab4a1c6405ffad75096b80433ba54785ffa4c5088c1a127689a945f0f86058a42de1d3efea3cc4967832d662
2 parents ceecefe + fa79dff commit 1c11e53

File tree

3 files changed

+25
-4
lines changed

3 files changed

+25
-4
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,12 @@ jobs:
8989
- set -o errexit; source ./ci/extended_lint/06_script.sh
9090

9191
- stage: test
92-
name: 'ARM [GOAL: install] [no unit or functional tests]'
92+
name: 'ARM [GOAL: install] [unit tests, no functional tests]'
9393
env: >-
9494
FILE_ENV="./ci/test/00_setup_env_arm.sh"
9595
9696
- stage: test
97-
name: 'Win64 [GOAL: deploy] [no gui or functional tests]'
97+
name: 'Win64 [GOAL: deploy] [unit tests, no gui, no functional tests]'
9898
env: >-
9999
FILE_ENV="./ci/test/00_setup_env_win64.sh"
100100

ci/test/00_setup_env_arm.sh

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

99
export HOST=arm-linux-gnueabihf
10-
export PACKAGES="python3 g++-arm-linux-gnueabihf busybox"
10+
export QEMU_USER_CMD="qemu-arm -L /usr/arm-linux-gnueabihf/"
11+
export PACKAGES="python3 g++-arm-linux-gnueabihf busybox qemu-user"
1112
export USE_BUSY_BOX=true
12-
export RUN_UNIT_TESTS=false
13+
export RUN_UNIT_TESTS=true
1314
export RUN_FUNCTIONAL_TESTS=false
1415
export GOAL="install"
1516
# -Wno-psabi is to disable ABI warnings: "note: parameter passing for argument of type ... changed in GCC 7.1"

ci/test/06_script_b.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,28 @@ export LC_ALL=C.UTF-8
88

99
cd "build/bitcoin-$HOST" || (echo "could not enter distdir build/bitcoin-$HOST"; exit 1)
1010

11+
if [ -n "$QEMU_USER_CMD" ]; then
12+
BEGIN_FOLD wrap-qemu
13+
echo "Prepare to run functional tests for HOST=$HOST"
14+
# Generate all binaries, so that they can be wrapped
15+
DOCKER_EXEC make $MAKEJOBS -C src/secp256k1 VERBOSE=1
16+
DOCKER_EXEC make $MAKEJOBS -C src/univalue VERBOSE=1
17+
for b_name in {"${BASE_OUTDIR}/bin"/*,src/secp256k1/*tests,src/univalue/{no_nul,test_json,unitester,object}}; do
18+
# shellcheck disable=SC2044
19+
for b in $(find "${BASE_ROOT_DIR}" -executable -type f -name $(basename $b_name)); do
20+
echo "Wrap $b ..."
21+
DOCKER_EXEC mv "$b" "${b}_orig"
22+
DOCKER_EXEC echo "\#\!/usr/bin/env bash" \> "$b"
23+
DOCKER_EXEC echo "$QEMU_USER_CMD \\\"${b}_orig\\\" \\\"\\\$@\\\"" \>\> "$b"
24+
DOCKER_EXEC chmod +x "$b"
25+
done
26+
done
27+
END_FOLD
28+
fi
29+
1130
if [ "$RUN_UNIT_TESTS" = "true" ]; then
1231
BEGIN_FOLD unit-tests
32+
bash -c "while sleep 500; do echo .; done" & # Print dots in case the unit tests take a long time to run
1333
DOCKER_EXEC LD_LIBRARY_PATH=$BASE_BUILD_DIR/depends/$HOST/lib make $MAKEJOBS check VERBOSE=1
1434
END_FOLD
1535
fi

0 commit comments

Comments
 (0)