add setup/reboot test
This commit is contained in:
parent
5bbd1d2c48
commit
db4ee04167
2 changed files with 58 additions and 0 deletions
6
setup/reboot/main.fmf
Normal file
6
setup/reboot/main.fmf
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
summary: reboot test system
|
||||
description: ''
|
||||
contact: Karel Srot <ksrot@redhat.com>
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
duration: 15m
|
||||
52
setup/reboot/runtest.sh
Executable file
52
setup/reboot/runtest.sh
Executable file
|
|
@ -0,0 +1,52 @@
|
|||
#!/bin/bash
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Description: reboot test system
|
||||
# Author: Karel Srot <ksrot@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2025 Red Hat, Inc.
|
||||
#
|
||||
# This copyrighted material is made available to anyone wishing
|
||||
# to use, modify, copy, or redistribute it subject to the terms
|
||||
# and conditions of the GNU General Public License version 2.
|
||||
#
|
||||
# This program is distributed in the hope that it will be
|
||||
# useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
# PURPOSE. See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public
|
||||
# License along with this program; if not, write to the Free
|
||||
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
# Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
# Include Beaker environment
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
COOKIE=/var/tmp/opencryptoki-setup-system-rebooted
|
||||
|
||||
rlJournalStart
|
||||
|
||||
if [ ! -e $COOKIE ]; then
|
||||
rlPhaseStartSetup "pre-reboot phase"
|
||||
rlRun "uname -a"
|
||||
rlRun "cat /proc/cmdline"
|
||||
rlRun "touch $COOKIE"
|
||||
rlLogInfo "going to reboot now..."
|
||||
rlPhaseEnd
|
||||
rhts-reboot
|
||||
else
|
||||
rlPhaseStartTest "post-reboot phase"
|
||||
rlRun "uname -a"
|
||||
rlRun "cat /proc/cmdline"
|
||||
rlRun "uptime"
|
||||
rlRun "rm -f $COOKIE"
|
||||
rlPhaseEnd
|
||||
fi
|
||||
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
||||
Loading…
Add table
Add a link
Reference in a new issue