From dd1253a6e2778fcaf0431e6a45b4409339077940 Mon Sep 17 00:00:00 2001 From: Guillaume Chatelet Date: Thu, 12 Jan 2023 13:03:48 +0100 Subject: [PATCH 1/2] Include tests when using QEMU --- scripts/run_integration.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/run_integration.sh b/scripts/run_integration.sh index 8376360d..c448f6b8 100755 --- a/scripts/run_integration.sh +++ b/scripts/run_integration.sh @@ -330,7 +330,10 @@ function run_test() { cd "${BUILD_DIR}" || exit 2 set -x - for test_binary in "${BUILD_DIR}"/list_cpu_feature* ; do + declare -a TEST_BINARIES=() + TEST_BINARIES+=($(find "${BUILD_DIR}"/test -executable -type f)) + TEST_BINARIES+=($(find "${BUILD_DIR}" -maxdepth 1 -executable -type f)) + for test_binary in ${TEST_BINARIES[*]} ; do ${RUN_CMD} "${test_binary}" done set +x From c03c921d179709b9329c0a39aa675567c83a6c51 Mon Sep 17 00:00:00 2001 From: Guillaume Chatelet Date: Thu, 12 Jan 2023 12:10:29 +0000 Subject: [PATCH 2/2] Also add `set -e` so we fail when tests fail --- scripts/run_integration.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/run_integration.sh b/scripts/run_integration.sh index c448f6b8..3f84e127 100755 --- a/scripts/run_integration.sh +++ b/scripts/run_integration.sh @@ -329,13 +329,15 @@ function run_test() { RUN_CMD="${QEMU_INSTALL}/bin/qemu-${QEMU_ARCH} ${QEMU_ARGS[*]}" cd "${BUILD_DIR}" || exit 2 - set -x declare -a TEST_BINARIES=() TEST_BINARIES+=($(find "${BUILD_DIR}"/test -executable -type f)) TEST_BINARIES+=($(find "${BUILD_DIR}" -maxdepth 1 -executable -type f)) + set -x + set -e for test_binary in ${TEST_BINARIES[*]} ; do ${RUN_CMD} "${test_binary}" done + set +e set +x }