1#!/bin/bash 2 3verbose="no" 4 5if [ ! -f config.mak ]; then 6 echo "run ./configure && make first. See ./configure -h" 7 exit 8fi 9source config.mak 10source scripts/functions.bash 11 12function usage() 13{ 14cat <<EOF 15 16Usage: $0 [-g group] [-h] [-v] 17 18 -g: Only execute tests in the given group 19 -h: Output this help text 20 -v: Enables verbose mode 21 22Set the environment variable QEMU=/path/to/qemu-system-ARCH to 23specify the appropriate qemu binary for ARCH-run. 24 25EOF 26} 27 28RUNTIME_arch_run="./$TEST_DIR/run" 29source scripts/runtime.bash 30 31while getopts "g:hv" opt; do 32 case $opt in 33 g) 34 only_group=$OPTARG 35 ;; 36 h) 37 usage 38 exit 39 ;; 40 v) 41 verbose="yes" 42 ;; 43 *) 44 exit 45 ;; 46 esac 47done 48 49RUNTIME_arch_run="./$TEST_DIR/run >> test.log" 50config=$TEST_DIR/unittests.cfg 51rm -f test.log 52echo > test.log 53for_each_unittest $config run 54