diff options
| author | Steven Rostedt <srostedt@redhat.com> | 2011-11-23 16:00:48 -0500 |
|---|---|---|
| committer | Steven Rostedt <rostedt@goodmis.org> | 2011-12-22 21:59:26 -0500 |
| commit | dbd3783b4dd33dd7ce5c378bf5b1da27a1298735 (patch) | |
| tree | a525e933e92e8302a8b88631ee702fde81a254a4 /tools/testing/ktest | |
| parent | bb8474b181a715182a110c8ed2b3786ea7487f2b (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')
| -rwxr-xr-x | tools/testing/ktest/ktest.pl | 15 |
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. |
| 141 | my $buildonly = 1; | 141 | my $buildonly = 1; |
| 142 | 142 | ||
| 143 | # set when creating a new config | ||
| 144 | my $newconfig = 0; | ||
| 145 | |||
| 143 | my %entered_configs; | 146 | my %entered_configs; |
| 144 | my %config_help; | 147 | my %config_help; |
| 145 | my %variable; | 148 | my %variable; |
| @@ -179,6 +182,11 @@ $config_help{"BUILD_TARGET"} = << "EOF" | |||
| 179 | (relative to OUTPUT_DIR) | 182 | (relative to OUTPUT_DIR) |
| 180 | EOF | 183 | EOF |
| 181 | ; | 184 | ; |
| 185 | $config_help{"BUILD_OPTIONS"} = << "EOF" | ||
| 186 | Options to add to \"make\" when building. | ||
| 187 | i.e. -j20 | ||
| 188 | EOF | ||
| 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. |
| 184 | EOF | 192 | EOF |
| @@ -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 | ||
| 3096 | if (! -f $ktest_config) { | 3108 | if (! -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" |
