xref: /kvm-unit-tests/scripts/s390x/func.bash (revision d74708246bd9a593e03ecca476a5f1ed36e47288)
1# The file scripts/common.bash has to be the only file sourcing this
2# arch helper file
3source config.mak
4
5ARCH_CMD=arch_cmd_s390x
6
7function arch_cmd_s390x()
8{
9	local cmd=$1
10	local testname=$2
11	local groups=$3
12	local smp=$4
13	local kernel=$5
14	local opts=$6
15	local arch=$7
16	local check=$8
17	local accel=$9
18	local timeout=${10}
19
20	# run the normal test case
21	"$cmd" "$testname" "$groups" "$smp" "$kernel" "$opts" "$arch" "$check" "$accel" "$timeout"
22
23	# run PV test case
24	kernel=${kernel%.elf}.pv.bin
25	testname=${testname}_PV
26	if [ ! -f "${kernel}" ]; then
27		if [ -z "${HOST_KEY_DOCUMENT}" ]; then
28			return 2
29		fi
30
31		print_result 'SKIP' $testname '' 'PVM image was not created'
32		return 2
33	fi
34	"$cmd" "$testname" "$groups pv" "$smp" "$kernel" "$opts" "$arch" "$check" "$accel" "$timeout"
35}
36