compare-ktest-sample.pl 524 B

123456789101112131415161718192021222324252627282930313233
  1. #!/usr/bin/perl
  2. open (IN,"ktest.pl");
  3. while (<IN>) {
  4. # hashes are now used
  5. if (/\$opt\{"?([A-Z].*?)(\[.*\])?"?\}/ ||
  6. /^\s*"?([A-Z].*?)"?\s*=>\s*/ ||
  7. /set_test_option\("(.*?)"/) {
  8. $opt{$1} = 1;
  9. }
  10. }
  11. close IN;
  12. open (IN, "sample.conf");
  13. while (<IN>) {
  14. if (/^\s*#?\s*([A-Z]\S*)\s*=/) {
  15. $samp{$1} = 1;
  16. }
  17. }
  18. close IN;
  19. foreach $opt (keys %opt) {
  20. if (!defined($samp{$opt})) {
  21. print "opt = $opt\n";
  22. }
  23. }
  24. foreach $samp (keys %samp) {
  25. if (!defined($opt{$samp})) {
  26. print "samp = $samp\n";
  27. }
  28. }