From 0e147b90a555ae89667753b835a60654cc7dd350 Mon Sep 17 00:00:00 2001 From: Steven Rostedt Date: Wed, 23 Nov 2011 13:41:18 -0500 Subject: [PATCH] --- yaml --- r: 285889 b: refs/heads/master c: c4261d0f62ccbb42184d13b43807b36b100e8fb5 h: refs/heads/master i: 285887: 37133bb0aebcf1d843e0d1f6a371d6811f5a0be2 v: v3 --- [refs] | 2 +- trunk/tools/testing/ktest/ktest.pl | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 0f617623128e..bc458a778885 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: dad98754924735d4dfcbd49b68c00957e999c0ef +refs/heads/master: c4261d0f62ccbb42184d13b43807b36b100e8fb5 diff --git a/trunk/tools/testing/ktest/ktest.pl b/trunk/tools/testing/ktest/ktest.pl index 2ffb67c3c49d..f50b44fa8a03 100755 --- a/trunk/tools/testing/ktest/ktest.pl +++ b/trunk/tools/testing/ktest/ktest.pl @@ -752,6 +752,15 @@ sub __read_config { return $test_case; } +sub get_test_case { + print "What test case would you like to run?\n"; + print " (build, install or boot)\n"; + print " Other tests are available but require editing the config file\n"; + my $ans = ; + chomp $ans; + $default{"TEST_TYPE"} = $ans; +} + sub read_config { my ($config) = @_; @@ -766,10 +775,7 @@ sub read_config { # was a test specified? if (!$test_case) { print "No test case specified.\n"; - print "What test case would you like to run?\n"; - my $ans = ; - chomp $ans; - $default{"TEST_TYPE"} = $ans; + get_test_case; } # set any defaults @@ -3070,6 +3076,7 @@ sub make_min_config { } if (! -f $ktest_config) { + get_test_case; open(OUT, ">$ktest_config") or die "Can not create $ktest_config"; print OUT << "EOF" # Generated by ktest.pl @@ -3088,6 +3095,7 @@ sub make_min_config { # Define each test with TEST_START # The config options below it will override the defaults TEST_START +TEST_TYPE = $default{"TEST_TYPE"} DEFAULTS EOF