diff options
author | Steven Rostedt <srostedt@redhat.com> | 2011-11-26 20:56:52 -0500 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2011-12-22 21:59:30 -0500 |
commit | 165708b273f87ac52a4564b114a6c046e6b3a02d (patch) | |
tree | c410b3636d45877f656c7879cebad05a927a3942 /tools/testing/ktest/ktest.pl | |
parent | dbd3783b4dd33dd7ce5c378bf5b1da27a1298735 (diff) |
ktest: Only ask options needed for install
If all the tests are only for build or install, do not ask
for options not needed to do the install, if the options do
not exist.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'tools/testing/ktest/ktest.pl')
-rwxr-xr-x | tools/testing/ktest/ktest.pl | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl index 2b547d6683cd..5d82c275e9e6 100755 --- a/tools/testing/ktest/ktest.pl +++ b/tools/testing/ktest/ktest.pl | |||
@@ -136,7 +136,7 @@ my $localversion; | |||
136 | my $iteration = 0; | 136 | my $iteration = 0; |
137 | my $successes = 0; | 137 | my $successes = 0; |
138 | 138 | ||
139 | # set when a test is something other that just building | 139 | # set when a test is something other that just building or install |
140 | # which would require more options. | 140 | # which would require more options. |
141 | my $buildonly = 1; | 141 | my $buildonly = 1; |
142 | 142 | ||
@@ -343,11 +343,15 @@ sub get_ktest_configs { | |||
343 | 343 | ||
344 | # options required for other than just building a kernel | 344 | # options required for other than just building a kernel |
345 | if (!$buildonly) { | 345 | if (!$buildonly) { |
346 | get_ktest_config("POWER_CYCLE"); | ||
347 | get_ktest_config("CONSOLE"); | ||
348 | } | ||
349 | |||
350 | # options required for install and more | ||
351 | if ($buildonly != 1) { | ||
346 | get_ktest_config("SSH_USER"); | 352 | get_ktest_config("SSH_USER"); |
347 | get_ktest_config("BUILD_TARGET"); | 353 | get_ktest_config("BUILD_TARGET"); |
348 | get_ktest_config("TARGET_IMAGE"); | 354 | get_ktest_config("TARGET_IMAGE"); |
349 | get_ktest_config("POWER_CYCLE"); | ||
350 | get_ktest_config("CONSOLE"); | ||
351 | } | 355 | } |
352 | 356 | ||
353 | get_ktest_config("LOCALVERSION"); | 357 | get_ktest_config("LOCALVERSION"); |
@@ -412,10 +416,15 @@ sub process_variables { | |||
412 | sub set_value { | 416 | sub set_value { |
413 | my ($lvalue, $rvalue, $override, $overrides, $name) = @_; | 417 | my ($lvalue, $rvalue, $override, $overrides, $name) = @_; |
414 | 418 | ||
415 | if ($lvalue =~ /^TEST_TYPE(\[.*\])?$/ && $rvalue ne "build") { | 419 | if ($buildonly && $lvalue =~ /^TEST_TYPE(\[.*\])?$/ && $rvalue ne "build") { |
416 | # Note if a test is something other than build, then we | 420 | # Note if a test is something other than build, then we |
417 | # will need other manditory options. | 421 | # will need other manditory options. |
418 | $buildonly = 0; | 422 | if ($rvalue ne "install") { |
423 | $buildonly = 0; | ||
424 | } else { | ||
425 | # install still limits some manditory options. | ||
426 | $buildonly = 2; | ||
427 | } | ||
419 | } | 428 | } |
420 | 429 | ||
421 | if (defined($opt{$lvalue})) { | 430 | if (defined($opt{$lvalue})) { |