summaryrefslogtreecommitdiffstats
path: root/tools/testing/ktest/ktest.pl
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2012-05-21 17:13:40 -0400
committerSteven Rostedt <rostedt@goodmis.org>2012-05-21 17:13:40 -0400
commitccc513b688e1f409c03cfaa7117cda778331f6fb (patch)
tree9a3e553d7734f050dfe7ac981980ae51fd61c9b0 /tools/testing/ktest/ktest.pl
parent683a3e6481a5cffc58496a590decf65909d0454b (diff)
downloadblackbird-op-linux-ccc513b688e1f409c03cfaa7117cda778331f6fb.tar.gz
blackbird-op-linux-ccc513b688e1f409c03cfaa7117cda778331f6fb.zip
ktest: Add MIN_CONFIG_TYPE to allow making a minum .config that has network
Add a MIN_CONFIG_TYPE that can be set to 'test' or 'boot'. The default is 'boot' which is what make_min_config has done previously: makes a config file that is the minimum needed to boot the target. But when MIN_CONFIG_TYPE is set to 'test', not only must the target boot, but it must also successfully run the TEST. This allows the creation of a config file that is the minimum to boot and also perform ssh to the target, or anything else a developer wants. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'tools/testing/ktest/ktest.pl')
-rwxr-xr-xtools/testing/ktest/ktest.pl14
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
index 50b6726c3865..b6de81927cc3 100755
--- a/tools/testing/ktest/ktest.pl
+++ b/tools/testing/ktest/ktest.pl
@@ -39,6 +39,7 @@ my %default = (
"CLEAR_LOG" => 0,
"BISECT_MANUAL" => 0,
"BISECT_SKIP" => 1,
+ "MIN_CONFIG_TYPE" => "boot",
"SUCCESS_LINE" => "login:",
"DETECT_TRIPLE_FAULT" => 1,
"NO_INSTALL" => 0,
@@ -107,6 +108,7 @@ my $minconfig;
my $start_minconfig;
my $start_minconfig_defined;
my $output_minconfig;
+my $minconfig_type;
my $ignore_config;
my $ignore_errors;
my $addconfig;
@@ -206,6 +208,7 @@ my %option_map = (
"MIN_CONFIG" => \$minconfig,
"OUTPUT_MIN_CONFIG" => \$output_minconfig,
"START_MIN_CONFIG" => \$start_minconfig,
+ "MIN_CONFIG_TYPE" => \$minconfig_type,
"IGNORE_CONFIG" => \$ignore_config,
"TEST" => \$run_test,
"ADD_CONFIG" => \$addconfig,
@@ -3128,6 +3131,12 @@ sub test_this_config {
sub make_min_config {
my ($i) = @_;
+ my $type = $minconfig_type;
+ if ($type ne "boot" && $type ne "test") {
+ fail "Invalid MIN_CONFIG_TYPE '$minconfig_type'\n" .
+ " make_min_config works only with 'boot' and 'test'\n" and return;
+ }
+
if (!defined($output_minconfig)) {
fail "OUTPUT_MIN_CONFIG not defined" and return;
}
@@ -3287,6 +3296,11 @@ sub make_min_config {
build "oldconfig" or $failed = 1;
if (!$failed) {
start_monitor_and_boot or $failed = 1;
+
+ if ($type eq "test" && !$failed) {
+ do_run_test or $failed = 1;
+ }
+
end_monitor;
}
OpenPOWER on IntegriCloud