aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/ktest/ktest.pl
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 /tools/testing/ktest/ktest.pl
parentbb8474b181a715182a110c8ed2b3786ea7487f2b (diff)
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>
Diffstat (limited to 'tools/testing/ktest/ktest.pl')
-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;
140# which would require more options. 140# which would require more options.
141my $buildonly = 1; 141my $buildonly = 1;
142 142
143# set when creating a new config
144my $newconfig = 0;
145
143my %entered_configs; 146my %entered_configs;
144my %config_help; 147my %config_help;
145my %variable; 148my %variable;
@@ -179,6 +182,11 @@ $config_help{"BUILD_TARGET"} = << "EOF"
179 (relative to OUTPUT_DIR) 182 (relative to OUTPUT_DIR)
180EOF 183EOF
181 ; 184 ;
185$config_help{"BUILD_OPTIONS"} = << "EOF"
186 Options to add to \"make\" when building.
187 i.e. -j20
188EOF
189 ;
182$config_help{"TARGET_IMAGE"} = << "EOF" 190$config_help{"TARGET_IMAGE"} = << "EOF"
183 The place to put your image on the test machine. 191 The place to put your image on the test machine.
184EOF 192EOF
@@ -306,7 +314,7 @@ sub get_ktest_config {
306 314
307 for (;;) { 315 for (;;) {
308 print "$config = "; 316 print "$config = ";
309 if (defined($default{$config})) { 317 if (defined($default{$config}) && length($default{$config})) {
310 print "\[$default{$config}\] "; 318 print "\[$default{$config}\] ";
311 } 319 }
312 $ans = <STDIN>; 320 $ans = <STDIN>;
@@ -329,6 +337,10 @@ sub get_ktest_configs {
329 get_ktest_config("BUILD_DIR"); 337 get_ktest_config("BUILD_DIR");
330 get_ktest_config("OUTPUT_DIR"); 338 get_ktest_config("OUTPUT_DIR");
331 339
340 if ($newconfig) {
341 get_ktest_config("BUILD_OPTIONS");
342 }
343
332 # options required for other than just building a kernel 344 # options required for other than just building a kernel
333 if (!$buildonly) { 345 if (!$buildonly) {
334 get_ktest_config("SSH_USER"); 346 get_ktest_config("SSH_USER");
@@ -3094,6 +3106,7 @@ if ($#ARGV == 0) {
3094} 3106}
3095 3107
3096if (! -f $ktest_config) { 3108if (! -f $ktest_config) {
3109 $newconfig = 1;
3097 get_test_case; 3110 get_test_case;
3098 open(OUT, ">$ktest_config") or die "Can not create $ktest_config"; 3111 open(OUT, ">$ktest_config") or die "Can not create $ktest_config";
3099 print OUT << "EOF" 3112 print OUT << "EOF"