diff options
author | Steven Rostedt <srostedt@redhat.com> | 2011-06-14 20:51:37 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2011-06-14 20:51:37 -0400 |
commit | 0df213ca31f43faf0b1d6c7108e190ff198b42d3 (patch) | |
tree | 5e73134920125d2ac0a95733de9cc24238a56eb5 /tools/testing | |
parent | ddf607e5f853ae172e81e6051e1e12e24ea8a3c6 (diff) | |
download | op-kernel-dev-0df213ca31f43faf0b1d6c7108e190ff198b42d3.zip op-kernel-dev-0df213ca31f43faf0b1d6c7108e190ff198b42d3.tar.gz |
ktest: Require one TEST_START in config file
There has been too many times that I put in one too many SKIP
TEST_STARTs and start the test with the default randconfig by accident
that I added this to have ktest ask the user for which test they want to
run if no TEST_START is specified.
Now if I accidently start the test with all TEST_STARTs skipped, ktest
asks what test do I want to run, and I now have a chance to kill it
before it does a make mrproper on my build directory.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'tools/testing')
-rwxr-xr-x | tools/testing/ktest/ktest.pl | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl index 099ceee..6166f3a 100755 --- a/tools/testing/ktest/ktest.pl +++ b/tools/testing/ktest/ktest.pl @@ -345,6 +345,7 @@ sub read_config { my $num_tests_set = 0; my $skip = 0; my $rest; + my $test_case = 0; while (<IN>) { @@ -370,6 +371,7 @@ sub read_config { $rest = $1; $skip = 1; } else { + $test_case = 1; $skip = 0; } @@ -474,6 +476,15 @@ sub read_config { # make sure we have all mandatory configs get_ktest_configs; + # 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 = <STDIN>; + chomp $ans; + $default{"TEST_TYPE"} = $ans; + } + # set any defaults foreach my $default (keys %default) { |