1
0
mirror of https://github.com/google/cpu_features.git synced 2025-04-27 15:12:30 +02:00

Include tests when using QEMU (#288)

* Include tests when using QEMU
* Also add `set -e` so we fail when tests fail
This commit is contained in:
Guillaume Chatelet 2023-01-12 15:54:02 +00:00 committed by GitHub
parent 4e191a4cc8
commit a7ea4a7783
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -329,10 +329,15 @@ function run_test() {
RUN_CMD="${QEMU_INSTALL}/bin/qemu-${QEMU_ARCH} ${QEMU_ARGS[*]}"
cd "${BUILD_DIR}" || exit 2
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
for test_binary in "${BUILD_DIR}"/list_cpu_feature* ; do
set -e
for test_binary in ${TEST_BINARIES[*]} ; do
${RUN_CMD} "${test_binary}"
done
set +e
set +x
}