ktest: Change initialization of defaults hash to perl format
Initializing each default value by specifying the hash name is ugly. This is one of the rare cases that the "perl way" is actually much cleaner and easier to read. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
This commit is contained in:
parent
bc7c580377
commit
4f43e0dcaf
|
@ -18,46 +18,47 @@ $| = 1;
|
||||||
my %opt;
|
my %opt;
|
||||||
my %repeat_tests;
|
my %repeat_tests;
|
||||||
my %repeats;
|
my %repeats;
|
||||||
my %default;
|
|
||||||
|
|
||||||
#default opts
|
#default opts
|
||||||
$default{"NUM_TESTS"} = 1;
|
my %default = (
|
||||||
$default{"TEST_TYPE"} = "build";
|
"NUM_TESTS" => 1,
|
||||||
$default{"BUILD_TYPE"} = "randconfig";
|
"TEST_TYPE" => "build",
|
||||||
$default{"MAKE_CMD"} = "make";
|
"BUILD_TYPE" => "randconfig",
|
||||||
$default{"TIMEOUT"} = 120;
|
"MAKE_CMD" => "make",
|
||||||
$default{"TMP_DIR"} = "/tmp/ktest/\${MACHINE}";
|
"TIMEOUT" => 120,
|
||||||
$default{"SLEEP_TIME"} = 60; # sleep time between tests
|
"TMP_DIR" => "/tmp/ktest/\${MACHINE}",
|
||||||
$default{"BUILD_NOCLEAN"} = 0;
|
"SLEEP_TIME" => 60, # sleep time between tests
|
||||||
$default{"REBOOT_ON_ERROR"} = 0;
|
"BUILD_NOCLEAN" => 0,
|
||||||
$default{"POWEROFF_ON_ERROR"} = 0;
|
"REBOOT_ON_ERROR" => 0,
|
||||||
$default{"REBOOT_ON_SUCCESS"} = 1;
|
"POWEROFF_ON_ERROR" => 0,
|
||||||
$default{"POWEROFF_ON_SUCCESS"} = 0;
|
"REBOOT_ON_SUCCESS" => 1,
|
||||||
$default{"BUILD_OPTIONS"} = "";
|
"POWEROFF_ON_SUCCESS" => 0,
|
||||||
$default{"BISECT_SLEEP_TIME"} = 60; # sleep time between bisects
|
"BUILD_OPTIONS" => "",
|
||||||
$default{"PATCHCHECK_SLEEP_TIME"} = 60; # sleep time between patch checks
|
"BISECT_SLEEP_TIME" => 60, # sleep time between bisects
|
||||||
$default{"CLEAR_LOG"} = 0;
|
"PATCHCHECK_SLEEP_TIME" => 60, # sleep time between patch checks
|
||||||
$default{"BISECT_MANUAL"} = 0;
|
"CLEAR_LOG" => 0,
|
||||||
$default{"BISECT_SKIP"} = 1;
|
"BISECT_MANUAL" => 0,
|
||||||
$default{"SUCCESS_LINE"} = "login:";
|
"BISECT_SKIP" => 1,
|
||||||
$default{"DETECT_TRIPLE_FAULT"} = 1;
|
"SUCCESS_LINE" => "login:",
|
||||||
$default{"NO_INSTALL"} = 0;
|
"DETECT_TRIPLE_FAULT" => 1,
|
||||||
$default{"BOOTED_TIMEOUT"} = 1;
|
"NO_INSTALL" => 0,
|
||||||
$default{"DIE_ON_FAILURE"} = 1;
|
"BOOTED_TIMEOUT" => 1,
|
||||||
$default{"SSH_EXEC"} = "ssh \$SSH_USER\@\$MACHINE \$SSH_COMMAND";
|
"DIE_ON_FAILURE" => 1,
|
||||||
$default{"SCP_TO_TARGET"} = "scp \$SRC_FILE \$SSH_USER\@\$MACHINE:\$DST_FILE";
|
"SSH_EXEC" => "ssh \$SSH_USER\@\$MACHINE \$SSH_COMMAND",
|
||||||
$default{"REBOOT"} = "ssh \$SSH_USER\@\$MACHINE reboot";
|
"SCP_TO_TARGET" => "scp \$SRC_FILE \$SSH_USER\@\$MACHINE:\$DST_FILE",
|
||||||
$default{"STOP_AFTER_SUCCESS"} = 10;
|
"REBOOT" => "ssh \$SSH_USER\@\$MACHINE reboot",
|
||||||
$default{"STOP_AFTER_FAILURE"} = 60;
|
"STOP_AFTER_SUCCESS" => 10,
|
||||||
$default{"STOP_TEST_AFTER"} = 600;
|
"STOP_AFTER_FAILURE" => 60,
|
||||||
|
"STOP_TEST_AFTER" => 600,
|
||||||
|
|
||||||
# required, and we will ask users if they don't have them but we keep the default
|
# required, and we will ask users if they don't have them but we keep the default
|
||||||
# value something that is common.
|
# value something that is common.
|
||||||
$default{"REBOOT_TYPE"} = "grub";
|
"REBOOT_TYPE" => "grub",
|
||||||
$default{"LOCALVERSION"} = "-test";
|
"LOCALVERSION" => "-test",
|
||||||
$default{"SSH_USER"} = "root";
|
"SSH_USER" => "root",
|
||||||
$default{"BUILD_TARGET"} = "arch/x86/boot/bzImage";
|
"BUILD_TARGET" => "arch/x86/boot/bzImage",
|
||||||
$default{"TARGET_IMAGE"} = "/boot/vmlinuz-test";
|
"TARGET_IMAGE" => "/boot/vmlinuz-test",
|
||||||
|
);
|
||||||
|
|
||||||
my $ktest_config;
|
my $ktest_config;
|
||||||
my $version;
|
my $version;
|
||||||
|
|
Loading…
Reference in New Issue