xref: /kvm-unit-tests/scripts/vmm.bash (revision 9fcec1db99ec896b0bad74fe66a50810379c5261)
1function vmm_get_target()
2{
3	if [[ -z "$TARGET" ]]; then
4		echo "qemu"
5	else
6		echo "$TARGET"
7	fi
8}
9
10function vmm_check_supported()
11{
12	# We're not interested in the return code for vmm_get_target().
13	# shellcheck disable=SC2155
14	local target=$(vmm_get_target)
15
16	case "$target" in
17	qemu)
18		return 0
19		;;
20	*)
21		echo "$0 does not support target '$target'"
22		exit 2
23		;;
24	esac
25}
26