diff options
author | Steven Rostedt <srostedt@redhat.com> | 2011-12-22 22:06:59 -0500 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2011-12-22 22:06:59 -0500 |
commit | c2857cb4a855aba0c3f826bcd0dfef72abb0995b (patch) | |
tree | ea8ba66b4202505a4762ffcc7e9351711ad5c069 /tools/testing/ktest | |
parent | 9cc9e091ed4c70535309dd9336a5ea5c2c5920aa (diff) |
ktest: Fix compare script to test if options are not documented
The compare script compare-ktest-sample.pl checks for options
that are defined in ktest.pl and not documented in samples.conf,
as well as samples in samples.conf that are not used in ktest.pl.
With the switch to the hash format to initialize the ktest variables
the compare script needs to be updated to handle the change.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'tools/testing/ktest')
-rwxr-xr-x | tools/testing/ktest/compare-ktest-sample.pl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/testing/ktest/compare-ktest-sample.pl b/tools/testing/ktest/compare-ktest-sample.pl index 9a571e71683c..a373a5bfff68 100755 --- a/tools/testing/ktest/compare-ktest-sample.pl +++ b/tools/testing/ktest/compare-ktest-sample.pl | |||
@@ -2,7 +2,9 @@ | |||
2 | 2 | ||
3 | open (IN,"ktest.pl"); | 3 | open (IN,"ktest.pl"); |
4 | while (<IN>) { | 4 | while (<IN>) { |
5 | # hashes are now used | ||
5 | if (/\$opt\{"?([A-Z].*?)(\[.*\])?"?\}/ || | 6 | if (/\$opt\{"?([A-Z].*?)(\[.*\])?"?\}/ || |
7 | /^\s*"?([A-Z].*?)"?\s*=>\s*/ || | ||
6 | /set_test_option\("(.*?)"/) { | 8 | /set_test_option\("(.*?)"/) { |
7 | $opt{$1} = 1; | 9 | $opt{$1} = 1; |
8 | } | 10 | } |
@@ -11,7 +13,7 @@ close IN; | |||
11 | 13 | ||
12 | open (IN, "sample.conf"); | 14 | open (IN, "sample.conf"); |
13 | while (<IN>) { | 15 | while (<IN>) { |
14 | if (/^\s*#?\s*(\S+)\s*=/) { | 16 | if (/^\s*#?\s*([A-Z]\S*)\s*=/) { |
15 | $samp{$1} = 1; | 17 | $samp{$1} = 1; |
16 | } | 18 | } |
17 | } | 19 | } |