Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 275166
b: refs/heads/master
c: 2728be4
h: refs/heads/master
v: v3
  • Loading branch information
Andrew Jones authored and Steven Rostedt committed Oct 17, 2011
1 parent 48538d1 commit efe739a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 21 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 134882311cb9c2dca2ffadeabc5f8f9faa0fca81
refs/heads/master: 2728be418db65aa873ee354168b56f028845e956
36 changes: 16 additions & 20 deletions trunk/tools/testing/ktest/ktest.pl
Original file line number Diff line number Diff line change
Expand Up @@ -603,8 +603,13 @@ sub doprint {
}

sub run_command;
sub start_monitor;
sub end_monitor;
sub wait_for_monitor;

sub reboot {
my ($time) = @_;

# try to reboot normally
if (run_command $reboot) {
if (defined($powercycle_after_reboot)) {
Expand All @@ -615,6 +620,12 @@ sub reboot {
# nope? power cycle it.
run_command "$power_cycle";
}

if (defined($time)) {
start_monitor;
wait_for_monitor $time;
end_monitor;
}
}

sub do_not_reboot {
Expand Down Expand Up @@ -719,10 +730,7 @@ sub fail {
# no need to reboot for just building.
if (!do_not_reboot) {
doprint "REBOOTING\n";
reboot;
start_monitor;
wait_for_monitor $sleep_time;
end_monitor;
reboot $sleep_time;
}

my $name = "";
Expand Down Expand Up @@ -1356,10 +1364,7 @@ sub success {

if ($i != $opt{"NUM_TESTS"} && !do_not_reboot) {
doprint "Reboot and wait $sleep_time seconds\n";
reboot;
start_monitor;
wait_for_monitor $sleep_time;
end_monitor;
reboot $sleep_time;
}
}

Expand Down Expand Up @@ -1500,10 +1505,7 @@ sub run_git_bisect {

sub bisect_reboot {
doprint "Reboot and sleep $bisect_sleep_time seconds\n";
reboot;
start_monitor;
wait_for_monitor $bisect_sleep_time;
end_monitor;
reboot $bisect_sleep_time;
}

# returns 1 on success, 0 on failure, -1 on skip
Expand Down Expand Up @@ -2066,10 +2068,7 @@ sub config_bisect {

sub patchcheck_reboot {
doprint "Reboot and sleep $patchcheck_sleep_time seconds\n";
reboot;
start_monitor;
wait_for_monitor $patchcheck_sleep_time;
end_monitor;
reboot $patchcheck_sleep_time;
}

sub patchcheck {
Expand Down Expand Up @@ -2659,10 +2658,7 @@ sub make_min_config {
}

doprint "Reboot and wait $sleep_time seconds\n";
reboot;
start_monitor;
wait_for_monitor $sleep_time;
end_monitor;
reboot $sleep_time;
}

success $i;
Expand Down

0 comments on commit efe739a

Please sign in to comment.