summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2011-11-23 16:00:48 -0500
committerSteven Rostedt <rostedt@goodmis.org>2011-12-22 21:59:26 -0500
commitdbd3783b4dd33dd7ce5c378bf5b1da27a1298735 (patch)
treea525e933e92e8302a8b88631ee702fde81a254a4
parentbb8474b181a715182a110c8ed2b3786ea7487f2b (diff)
downloadlinux-dbd3783b4dd33dd7ce5c378bf5b1da27a1298735.tar.gz
linux-dbd3783b4dd33dd7ce5c378bf5b1da27a1298735.tar.bz2
linux-dbd3783b4dd33dd7ce5c378bf5b1da27a1298735.zip
ktest: When creating a new config, ask for BUILD_OPTIONS
When creating a new config, ask for the BUILD_OPTIONS variable that lets users add things like -j20 to the make. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rwxr-xr-xtools/testing/ktest/ktest.pl15
1 files changed, 14 insertions, 1 deletions
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
index 7159e10ab8a4..2b547d6683cd 100755
--- a/tools/testing/ktest/ktest.pl
+++ b/tools/testing/ktest/ktest.pl
@@ -140,6 +140,9 @@ my $successes = 0;
# which would require more options.
my $buildonly = 1;
+# set when creating a new config
+my $newconfig = 0;
+
my %entered_configs;
my %config_help;
my %variable;
@@ -179,6 +182,11 @@ $config_help{"BUILD_TARGET"} = << "EOF"
(relative to OUTPUT_DIR)
EOF
;
+$config_help{"BUILD_OPTIONS"} = << "EOF"
+ Options to add to \"make\" when building.
+ i.e. -j20
+EOF
+ ;
$config_help{"TARGET_IMAGE"} = << "EOF"
The place to put your image on the test machine.
EOF
@@ -306,7 +314,7 @@ sub get_ktest_config {
for (;;) {
print "$config = ";
- if (defined($default{$config})) {
+ if (defined($default{$config}) && length($default{$config})) {
print "\[$default{$config}\] ";
}
$ans = <STDIN>;
@@ -329,6 +337,10 @@ sub get_ktest_configs {
get_ktest_config("BUILD_DIR");
get_ktest_config("OUTPUT_DIR");
+ if ($newconfig) {
+ get_ktest_config("BUILD_OPTIONS");
+ }
+
# options required for other than just building a kernel
if (!$buildonly) {
get_ktest_config("SSH_USER");
@@ -3094,6 +3106,7 @@ if ($#ARGV == 0) {
}
if (! -f $ktest_config) {
+ $newconfig = 1;
get_test_case;
open(OUT, ">$ktest_config") or die "Can not create $ktest_config";
print OUT << "EOF"