diff options
author | Steven Rostedt <srostedt@redhat.com> | 2011-12-23 00:24:51 -0500 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2012-01-04 21:47:16 -0500 |
commit | 96f6a0df19238fceed77ddfc33bb2d6a4e1b9be6 (patch) | |
tree | 17b07fcf8ce8ec8a4ceedcf52e5aa21395c251f1 /tools/testing/ktest/ktest.pl | |
parent | c2857cb4a855aba0c3f826bcd0dfef72abb0995b (diff) | |
download | blackbird-op-linux-96f6a0df19238fceed77ddfc33bb2d6a4e1b9be6.tar.gz blackbird-op-linux-96f6a0df19238fceed77ddfc33bb2d6a4e1b9be6.zip |
ktest: Still do reboot even for REBOOT_TYPE = script
The REBOOT_TYPE may be either grub or script, if it is script
it is expected that a REBOOT_SCRIPT is defined.
With the SWITCH_TO_TEST which is the complement of SWITCH_TO_GOOD,
which does basically the same thing as REBOOT_SCRIPT and but for
both grub and script, the REBOOT_SCRIPT does not need to be mandatory
anymore.
Do not require the REBOOT_SCRIPT and always run the reboot code
for both grub and script.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'tools/testing/ktest/ktest.pl')
-rwxr-xr-x | tools/testing/ktest/ktest.pl | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl index f360cbdbf00f..f81c8b3a39a8 100755 --- a/tools/testing/ktest/ktest.pl +++ b/tools/testing/ktest/ktest.pl @@ -485,8 +485,6 @@ sub get_ktest_configs { if ($rtype eq "grub") { get_ktest_config("GRUB_MENU"); - } else { - get_ktest_config("REBOOT_SCRIPT"); } } @@ -1430,11 +1428,10 @@ sub reboot_to { if ($reboot_type eq "grub") { run_ssh "'(echo \"savedefault --default=$grub_number --once\" | grub --batch)'"; - reboot; - return; + } elsif (defined $reboot_script) { + run_command "$reboot_script"; } - - run_command "$reboot_script"; + reboot; } sub get_sha1 { @@ -3479,8 +3476,6 @@ for (my $i = 1; $i <= $opt{"NUM_TESTS"}; $i++) { $target = "$ssh_user\@$machine"; if ($reboot_type eq "grub") { dodie "GRUB_MENU not defined" if (!defined($grub_menu)); - } elsif (!defined($reboot_script)) { - dodie "REBOOT_SCRIPT not defined" } } |