summaryrefslogtreecommitdiff
path: root/tools/testing
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2010-11-02 14:57:51 -0400
committerSteven Rostedt <rostedt@goodmis.org>2010-11-18 11:23:07 -0500
commit1a5cfce344711a541aa63bdff81a58db35e20564 (patch)
treee70f3ede58a899fb592d3c6b6f6b8b5ac0ac0fd5 /tools/testing
parent5a391fbff8755592eb080784ef32ff818d2daa44 (diff)
downloadlinux-3.10-1a5cfce344711a541aa63bdff81a58db35e20564.tar.gz
linux-3.10-1a5cfce344711a541aa63bdff81a58db35e20564.tar.bz2
linux-3.10-1a5cfce344711a541aa63bdff81a58db35e20564.zip
ktest: Added reboot on success
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'tools/testing')
-rw-r--r--tools/testing/ktest/ktest.pl7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
index 9eaf8d05c74..f344fd0d4f2 100644
--- a/tools/testing/ktest/ktest.pl
+++ b/tools/testing/ktest/ktest.pl
@@ -21,6 +21,7 @@ $opt{"SLEEP_TIME"} = 60; # sleep time between tests
$opt{"BUILD_NOCLEAN"} = 0;
$opt{"REBOOT_ON_ERROR"} = 0;
$opt{"POWEROFF_ON_ERROR"} = 0;
+$opt{"REBOOT_ON_SUCCESS"} = 1;
$opt{"POWEROFF_ON_SUCCESS"} = 0;
$opt{"BUILD_OPTIONS"} = "";
$opt{"BISECT_SLEEP_TIME"} = 10; # sleep time between bisects
@@ -644,6 +645,10 @@ sub set_build_option {
for (my $i = 1; $i <= $opt{"NUM_BUILDS"}; $i++) {
my $type = "BUILD_TYPE[$i]";
+ if (!defined($opt{$type})) {
+ $opt{$type} = $opt{"DEFAULT_BUILD_TYPE"};
+ }
+
$noclean = set_build_option("BUILD_NOCLEAN", $i);
$minconfig = set_build_option("MIN_CONFIG", $i);
$run_test = set_build_option("TEST", $i);
@@ -674,7 +679,7 @@ for (my $i = 1; $i <= $opt{"NUM_BUILDS"}; $i++) {
if ($opt{"POWEROFF_ON_SUCCESS"}) {
halt;
-} else {
+} elsif ($opt{"REBOOT_ON_SUCCESS"}) {
reboot;
}