Petr Šabata f5bf49
#!/bin/sh
Petr Šabata f5bf49
Petr Šabata f5bf49
# Test RPMs to be installed
Petr Šabata f5bf49
TEST_RPMS=
Petr Šabata f5bf49
for _rpm in $@; do
Petr Šabata f5bf49
	if [[ ! -e $_rpm ]]; then
Petr Šabata f5bf49
		perror_exit "'$_rpm' not found"
Petr Šabata f5bf49
	else
Petr Šabata f5bf49
		TEST_RPMS=$(realpath "$_rpm")
Petr Šabata f5bf49
	fi
Petr Šabata f5bf49
done
Petr Šabata f5bf49
Petr Šabata f5bf49
img_run_cmd "mkdir -p /kexec-kdump-test"
Petr Šabata f5bf49
img_inst $TESTDIR/scripts/kexec-kdump-test/init.sh /kexec-kdump-test/init.sh
Petr Šabata f5bf49
img_inst $TESTDIR/scripts/kexec-kdump-test/test.sh /kexec-kdump-test/test.sh
Petr Šabata f5bf49
img_inst $TESTDIR/scripts/kexec-kdump-test/kexec-kdump-test.service /etc/systemd/system/kexec-kdump-test.service
Petr Šabata f5bf49
img_run_cmd "systemctl enable kexec-kdump-test.service"
Petr Šabata f5bf49
Petr Šabata f5bf49
img_inst_pkg $TEST_RPMS
Petr Šabata f5bf49
# Test script should start kdump manually to save time
Petr Šabata f5bf49
img_run_cmd "systemctl disable kdump.service"