ktest: Add default for ssh-user, build-target and target-image
authorSteven Rostedt <srostedt@redhat.com>
Tue, 22 Nov 2011 01:12:04 +0000 (20:12 -0500)
committerSteven Rostedt <rostedt@goodmis.org>
Tue, 22 Nov 2011 01:12:04 +0000 (20:12 -0500)
When a user runs ktest without an argument, or the argument given
is not a config file that exists, ktest will ask the user a few
questions to create a simple ktest config file.

A few of the questions should have a default value set, that if anything
it will make it easier for the user to know what is suppose to
be in that value.

These new values are:

  SSH_USER, BUILD_TARGET and TARGET_IMAGE

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
tools/testing/ktest/ktest.pl

index 6ef104e87ab02f0dabe3288a9500344649bbe1cc..05f429d68857d57468b1456784b8fba310153a2f 100755 (executable)
@@ -22,7 +22,6 @@ my %default;
 
 #default opts
 $default{"NUM_TESTS"}          = 1;
-$default{"REBOOT_TYPE"}                = "grub";
 $default{"TEST_TYPE"}          = "test";
 $default{"BUILD_TYPE"}         = "randconfig";
 $default{"MAKE_CMD"}           = "make";
@@ -51,7 +50,14 @@ $default{"REBOOT"}           = "ssh \$SSH_USER\@\$MACHINE reboot";
 $default{"STOP_AFTER_SUCCESS"} = 10;
 $default{"STOP_AFTER_FAILURE"} = 60;
 $default{"STOP_TEST_AFTER"}    = 600;
+
+# required, and we will ask users if they don't have them but we keep the default
+# value something that is common.
+$default{"REBOOT_TYPE"}                = "grub";
 $default{"LOCALVERSION"}       = "-test";
+$default{"SSH_USER"}           = "root";
+$default{"BUILD_TARGET"}       = "arch/x86/boot/bzImage";
+$default{"TARGET_IMAGE"}       = "/boot/vmlinuz-test";
 
 my $ktest_config;
 my $version;