aboutsummaryrefslogtreecommitdiff
path: root/ci/test/06_script_b.sh
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2019-10-02 17:10:57 -0400
committerMarcoFalke <falke.marco@gmail.com>2019-10-09 09:33:07 -0400
commitfa79dff624110992ca85c4abf6950e3ac0df72ef (patch)
treea71b59474fa6d11df4cda07de7ba642522049bc6 /ci/test/06_script_b.sh
parente173d587e1c2391f774d08f28b7337cbe4ffcbe5 (diff)
downloadbitcoin-fa79dff624110992ca85c4abf6950e3ac0df72ef.tar.xz
ci: Run tests on arm
Diffstat (limited to 'ci/test/06_script_b.sh')
-rwxr-xr-xci/test/06_script_b.sh20
1 files changed, 20 insertions, 0 deletions
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