aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2019-10-09 10:14:59 -0400
committerfanquake <fanquake@gmail.com>2019-10-09 10:30:48 -0400
commit1c11e53bb604835afd838f4520d3fdba25521c5b (patch)
tree243961aeb99c0551d853478860da3b7059649389
parentceecefe0b0e1595e3397e7523a5749e114304d28 (diff)
parentfa79dff624110992ca85c4abf6950e3ac0df72ef (diff)
Merge #17041: ci: Run tests on arm
fa79dff624110992ca85c4abf6950e3ac0df72ef ci: Run tests on arm (MarcoFalke) Pull request description: Closes #16576 ACKs for top commit: laanwj: ACK fa79dff624110992ca85c4abf6950e3ac0df72ef fanquake: ACK fa79dff624110992ca85c4abf6950e3ac0df72ef - assuming Travis is green again. Tree-SHA512: c430db9852632567c6836981fb3c5922ccd7d3b6ab4a1c6405ffad75096b80433ba54785ffa4c5088c1a127689a945f0f86058a42de1d3efea3cc4967832d662
-rw-r--r--.travis.yml4
-rw-r--r--ci/test/00_setup_env_arm.sh5
-rwxr-xr-xci/test/06_script_b.sh20
3 files changed, 25 insertions, 4 deletions
diff --git a/.travis.yml b/.travis.yml
index 3467103d10..6f27e47b88 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -89,12 +89,12 @@ jobs:
- set -o errexit; source ./ci/extended_lint/06_script.sh
- stage: test
- name: 'ARM [GOAL: install] [no unit or functional tests]'
+ name: 'ARM [GOAL: install] [unit tests, no functional tests]'
env: >-
FILE_ENV="./ci/test/00_setup_env_arm.sh"
- stage: test
- name: 'Win64 [GOAL: deploy] [no gui or functional tests]'
+ name: 'Win64 [GOAL: deploy] [unit tests, no gui, no functional tests]'
env: >-
FILE_ENV="./ci/test/00_setup_env_win64.sh"
diff --git a/ci/test/00_setup_env_arm.sh b/ci/test/00_setup_env_arm.sh
index db640015b1..9335f0b337 100644
--- a/ci/test/00_setup_env_arm.sh
+++ b/ci/test/00_setup_env_arm.sh
@@ -7,9 +7,10 @@
export LC_ALL=C.UTF-8
export HOST=arm-linux-gnueabihf
-export PACKAGES="python3 g++-arm-linux-gnueabihf busybox"
+export QEMU_USER_CMD="qemu-arm -L /usr/arm-linux-gnueabihf/"
+export PACKAGES="python3 g++-arm-linux-gnueabihf busybox qemu-user"
export USE_BUSY_BOX=true
-export RUN_UNIT_TESTS=false
+export RUN_UNIT_TESTS=true
export RUN_FUNCTIONAL_TESTS=false
export GOAL="install"
# -Wno-psabi is to disable ABI warnings: "note: parameter passing for argument of type ... changed in GCC 7.1"
diff --git a/ci/test/06_script_b.sh b/ci/test/06_script_b.sh
index ea7beae85f..1a5217277a 100755
--- a/ci/test/06_script_b.sh
+++ b/ci/test/06_script_b.sh
@@ -8,8 +8,28 @@ export LC_ALL=C.UTF-8
cd "build/bitcoin-$HOST" || (echo "could not enter distdir build/bitcoin-$HOST"; exit 1)
+if [ -n "$QEMU_USER_CMD" ]; then
+ BEGIN_FOLD wrap-qemu
+ echo "Prepare to run functional tests for HOST=$HOST"
+ # Generate all binaries, so that they can be wrapped
+ DOCKER_EXEC make $MAKEJOBS -C src/secp256k1 VERBOSE=1
+ DOCKER_EXEC make $MAKEJOBS -C src/univalue VERBOSE=1
+ for b_name in {"${BASE_OUTDIR}/bin"/*,src/secp256k1/*tests,src/univalue/{no_nul,test_json,unitester,object}}; do
+ # shellcheck disable=SC2044
+ for b in $(find "${BASE_ROOT_DIR}" -executable -type f -name $(basename $b_name)); do
+ echo "Wrap $b ..."
+ DOCKER_EXEC mv "$b" "${b}_orig"
+ DOCKER_EXEC echo "\#\!/usr/bin/env bash" \> "$b"
+ DOCKER_EXEC echo "$QEMU_USER_CMD \\\"${b}_orig\\\" \\\"\\\$@\\\"" \>\> "$b"
+ DOCKER_EXEC chmod +x "$b"
+ done
+ done
+ END_FOLD
+fi
+
if [ "$RUN_UNIT_TESTS" = "true" ]; then
BEGIN_FOLD unit-tests
+ bash -c "while sleep 500; do echo .; done" & # Print dots in case the unit tests take a long time to run
DOCKER_EXEC LD_LIBRARY_PATH=$BASE_BUILD_DIR/depends/$HOST/lib make $MAKEJOBS check VERBOSE=1
END_FOLD
fi