Skip to content

Commit

Permalink
ktest: Fix compare script to test if options are not documented
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Steven Rostedt authored and Steven Rostedt committed Dec 23, 2011
1 parent 9cc9e09 commit c2857cb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tools/testing/ktest/compare-ktest-sample.pl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

open (IN,"ktest.pl");
while (<IN>) {
# hashes are now used
if (/\$opt\{"?([A-Z].*?)(\[.*\])?"?\}/ ||
/^\s*"?([A-Z].*?)"?\s*=>\s*/ ||
/set_test_option\("(.*?)"/) {
$opt{$1} = 1;
}
Expand All @@ -11,7 +13,7 @@

open (IN, "sample.conf");
while (<IN>) {
if (/^\s*#?\s*(\S+)\s*=/) {
if (/^\s*#?\s*([A-Z]\S*)\s*=/) {
$samp{$1} = 1;
}
}
Expand Down

0 comments on commit c2857cb

Please sign in to comment.