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