diff options
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/testing/ktest/ktest.pl | 71 |
1 files changed, 36 insertions, 35 deletions
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl index ff21e921be25..85c5d943c6db 100755 --- a/tools/testing/ktest/ktest.pl +++ b/tools/testing/ktest/ktest.pl | |||
@@ -18,46 +18,47 @@ $| = 1; | |||
18 | my %opt; | 18 | my %opt; |
19 | my %repeat_tests; | 19 | my %repeat_tests; |
20 | my %repeats; | 20 | my %repeats; |
21 | my %default; | ||
22 | 21 | ||
23 | #default opts | 22 | #default opts |
24 | $default{"NUM_TESTS"} = 1; | 23 | my %default = ( |
25 | $default{"TEST_TYPE"} = "build"; | 24 | "NUM_TESTS" => 1, |
26 | $default{"BUILD_TYPE"} = "randconfig"; | 25 | "TEST_TYPE" => "build", |
27 | $default{"MAKE_CMD"} = "make"; | 26 | "BUILD_TYPE" => "randconfig", |
28 | $default{"TIMEOUT"} = 120; | 27 | "MAKE_CMD" => "make", |
29 | $default{"TMP_DIR"} = "/tmp/ktest/\${MACHINE}"; | 28 | "TIMEOUT" => 120, |
30 | $default{"SLEEP_TIME"} = 60; # sleep time between tests | 29 | "TMP_DIR" => "/tmp/ktest/\${MACHINE}", |
31 | $default{"BUILD_NOCLEAN"} = 0; | 30 | "SLEEP_TIME" => 60, # sleep time between tests |
32 | $default{"REBOOT_ON_ERROR"} = 0; | 31 | "BUILD_NOCLEAN" => 0, |
33 | $default{"POWEROFF_ON_ERROR"} = 0; | 32 | "REBOOT_ON_ERROR" => 0, |
34 | $default{"REBOOT_ON_SUCCESS"} = 1; | 33 | "POWEROFF_ON_ERROR" => 0, |
35 | $default{"POWEROFF_ON_SUCCESS"} = 0; | 34 | "REBOOT_ON_SUCCESS" => 1, |
36 | $default{"BUILD_OPTIONS"} = ""; | 35 | "POWEROFF_ON_SUCCESS" => 0, |
37 | $default{"BISECT_SLEEP_TIME"} = 60; # sleep time between bisects | 36 | "BUILD_OPTIONS" => "", |
38 | $default{"PATCHCHECK_SLEEP_TIME"} = 60; # sleep time between patch checks | 37 | "BISECT_SLEEP_TIME" => 60, # sleep time between bisects |
39 | $default{"CLEAR_LOG"} = 0; | 38 | "PATCHCHECK_SLEEP_TIME" => 60, # sleep time between patch checks |
40 | $default{"BISECT_MANUAL"} = 0; | 39 | "CLEAR_LOG" => 0, |
41 | $default{"BISECT_SKIP"} = 1; | 40 | "BISECT_MANUAL" => 0, |
42 | $default{"SUCCESS_LINE"} = "login:"; | 41 | "BISECT_SKIP" => 1, |
43 | $default{"DETECT_TRIPLE_FAULT"} = 1; | 42 | "SUCCESS_LINE" => "login:", |
44 | $default{"NO_INSTALL"} = 0; | 43 | "DETECT_TRIPLE_FAULT" => 1, |
45 | $default{"BOOTED_TIMEOUT"} = 1; | 44 | "NO_INSTALL" => 0, |
46 | $default{"DIE_ON_FAILURE"} = 1; | 45 | "BOOTED_TIMEOUT" => 1, |
47 | $default{"SSH_EXEC"} = "ssh \$SSH_USER\@\$MACHINE \$SSH_COMMAND"; | 46 | "DIE_ON_FAILURE" => 1, |
48 | $default{"SCP_TO_TARGET"} = "scp \$SRC_FILE \$SSH_USER\@\$MACHINE:\$DST_FILE"; | 47 | "SSH_EXEC" => "ssh \$SSH_USER\@\$MACHINE \$SSH_COMMAND", |
49 | $default{"REBOOT"} = "ssh \$SSH_USER\@\$MACHINE reboot"; | 48 | "SCP_TO_TARGET" => "scp \$SRC_FILE \$SSH_USER\@\$MACHINE:\$DST_FILE", |
50 | $default{"STOP_AFTER_SUCCESS"} = 10; | 49 | "REBOOT" => "ssh \$SSH_USER\@\$MACHINE reboot", |
51 | $default{"STOP_AFTER_FAILURE"} = 60; | 50 | "STOP_AFTER_SUCCESS" => 10, |
52 | $default{"STOP_TEST_AFTER"} = 600; | 51 | "STOP_AFTER_FAILURE" => 60, |
52 | "STOP_TEST_AFTER" => 600, | ||
53 | 53 | ||
54 | # required, and we will ask users if they don't have them but we keep the default | 54 | # required, and we will ask users if they don't have them but we keep the default |
55 | # value something that is common. | 55 | # value something that is common. |
56 | $default{"REBOOT_TYPE"} = "grub"; | 56 | "REBOOT_TYPE" => "grub", |
57 | $default{"LOCALVERSION"} = "-test"; | 57 | "LOCALVERSION" => "-test", |
58 | $default{"SSH_USER"} = "root"; | 58 | "SSH_USER" => "root", |
59 | $default{"BUILD_TARGET"} = "arch/x86/boot/bzImage"; | 59 | "BUILD_TARGET" => "arch/x86/boot/bzImage", |
60 | $default{"TARGET_IMAGE"} = "/boot/vmlinuz-test"; | 60 | "TARGET_IMAGE" => "/boot/vmlinuz-test", |
61 | ); | ||
61 | 62 | ||
62 | my $ktest_config; | 63 | my $ktest_config; |
63 | my $version; | 64 | my $version; |