compare-ktest-sample.pl 460 B

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