Skip to content
This repository
Browse code

Fix 01-syntax test failures

Exclude some tests with dependencies.

Remove -T from perl line in plugins
This makes it harder to test with PERL5LIB/perlbrew etc
  • Loading branch information...
commit a23d4b3da952d9e006c735fe61083a5a50ca4dc5 1 parent d8467d7
Ask Bjørn Hansen authored April 29, 2012

Showing 80 changed files with 85 additions and 79 deletions. Show diff stats Hide diff stats

  1. 1  Makefile.PL
  2. 2  plugins/async/check_earlytalker
  3. 2  plugins/async/dns_whitelist_soft
  4. 2  plugins/async/dnsbl
  5. 2  plugins/async/queue/smtp-forward
  6. 2  plugins/async/require_resolvable_fromhost
  7. 2  plugins/async/rhsbl
  8. 2  plugins/async/uribl
  9. 2  plugins/auth/auth_checkpassword
  10. 2  plugins/auth/auth_cvm_unix_local
  11. 2  plugins/auth/auth_flat_file
  12. 2  plugins/auth/auth_ldap_bind
  13. 2  plugins/auth/auth_vpopmail
  14. 2  plugins/auth/auth_vpopmail_sql
  15. 2  plugins/auth/auth_vpopmaild
  16. 2  plugins/auth/authdeny
  17. 2  plugins/check_badmailfrom
  18. 2  plugins/check_badmailfromto
  19. 2  plugins/check_badrcptto
  20. 2  plugins/check_badrcptto_patterns
  21. 2  plugins/check_basicheaders
  22. 2  plugins/check_bogus_bounce
  23. 2  plugins/check_earlytalker
  24. 2  plugins/check_loop
  25. 2  plugins/check_norelay
  26. 2  plugins/check_relay
  27. 2  plugins/check_spamhelo
  28. 2  plugins/connection_time
  29. 2  plugins/content_log
  30. 2  plugins/count_unrecognized_commands
  31. 2  plugins/dns_whitelist_soft
  32. 2  plugins/dnsbl
  33. 2  plugins/domainkeys
  34. 2  plugins/dont_require_anglebrackets
  35. 2  plugins/dspam
  36. 2  plugins/greylisting
  37. 2  plugins/help
  38. 2  plugins/hosts_allow
  39. 2  plugins/http_config
  40. 2  plugins/ident/geoip
  41. 2  plugins/ident/p0f
  42. 2  plugins/logging/adaptive
  43. 2  plugins/logging/apache
  44. 2  plugins/logging/connection_id
  45. 2  plugins/logging/devnull
  46. 2  plugins/logging/file
  47. 2  plugins/logging/syslog
  48. 2  plugins/logging/transaction_id
  49. 2  plugins/logging/warn
  50. 2  plugins/milter
  51. 2  plugins/noop_counter
  52. 2  plugins/parse_addr_withhelo
  53. 2  plugins/queue/exim-bsmtp
  54. 2  plugins/queue/maildir
  55. 2  plugins/queue/postfix-queue
  56. 2  plugins/queue/qmail-queue
  57. 2  plugins/queue/smtp-forward
  58. 2  plugins/quit_fortune
  59. 2  plugins/random_error
  60. 2  plugins/rcpt_map
  61. 2  plugins/rcpt_ok
  62. 2  plugins/rcpt_regexp
  63. 2  plugins/relay_only
  64. 2  plugins/require_resolvable_fromhost
  65. 2  plugins/rhsbl
  66. 2  plugins/sender_permitted_from
  67. 2  plugins/spamassassin
  68. 2  plugins/tls
  69. 2  plugins/tls_cert
  70. 2  plugins/uribl
  71. 2  plugins/virus/aveclient
  72. 2  plugins/virus/bitdefender
  73. 2  plugins/virus/clamav
  74. 2  plugins/virus/clamdscan
  75. 2  plugins/virus/hbedv
  76. 2  plugins/virus/kavscanner
  77. 2  plugins/virus/klez_filter
  78. 2  plugins/virus/sophie
  79. 2  plugins/virus/uvscan
  80. 7  t/01-syntax.t
1  Makefile.PL
@@ -14,6 +14,7 @@ WriteMakefile(
14 14
         'File::Temp'   => 0,
15 15
         'Time::HiRes'  => 0,
16 16
         'Net::IP'      => 0,
  17
+        'Date::Parse'  => 0,
17 18
     },
18 19
     ABSTRACT       => 'Flexible smtpd daemon written in Perl',
19 20
     AUTHOR         => 'Ask Bjoern Hansen <ask@develooper.com>',
2  plugins/async/check_earlytalker
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 
3 3
 =head1 NAME
4 4
 
2  plugins/async/dns_whitelist_soft
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 
3 3
 use Qpsmtpd::Plugin::Async::DNSBLBase;
4 4
 
2  plugins/async/dnsbl
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 
3 3
 use Qpsmtpd::Plugin::Async::DNSBLBase;
4 4
 
2  plugins/async/queue/smtp-forward
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 
3 3
 =head1 NAME
4 4
 
2  plugins/async/require_resolvable_fromhost
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 
3 3
 use Qpsmtpd::DSN;
4 4
 use ParaDNS;
2  plugins/async/rhsbl
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 
3 3
 use Qpsmtpd::Plugin::Async::DNSBLBase;
4 4
 
2  plugins/async/uribl
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 
3 3
 use Qpsmtpd::Plugin::Async::DNSBLBase;
4 4
 
2  plugins/auth/auth_checkpassword
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 
3 3
 =head1 NAME
4 4
 
2  plugins/auth/auth_cvm_unix_local
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 
3 3
 =head1 NAME
4 4
 
2  plugins/auth/auth_flat_file
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 
3 3
 =head1 NAME
4 4
 
2  plugins/auth/auth_ldap_bind
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 
3 3
 sub register {
4 4
   my ( $self, $qp, @args ) = @_;
2  plugins/auth/auth_vpopmail
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 use strict;
3 3
 
4 4
 =head1 NAME
2  plugins/auth/auth_vpopmail_sql
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 
3 3
 =head1 NAME
4 4
 
2  plugins/auth/auth_vpopmaild
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 
3 3
 use strict;
4 4
 use warnings;
2  plugins/auth/authdeny
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 
3 3
 =head1 NAME
4 4
 
2  plugins/check_badmailfrom
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 
3 3
 =head1 NAME
4 4
 
2  plugins/check_badmailfromto
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 
3 3
 =head1 NAME
4 4
 
2  plugins/check_badrcptto
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 
3 3
 # this plugin checks the badrcptto config (like badmailfrom, but for rcpt address
4 4
 # rather than sender address)
2  plugins/check_badrcptto_patterns
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 =pod
3 3
 
4 4
 =head1 SYNOPSIS
2  plugins/check_basicheaders
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 
3 3
 =head1 NAME
4 4
 
2  plugins/check_bogus_bounce
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 
3 3
 =head1 NAME
4 4
 
2  plugins/check_earlytalker
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 =head1 NAME
3 3
 
4 4
 check_earlytalker - Check that the client doesn't talk before we send the SMTP banner
2  plugins/check_loop
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 
3 3
 =head1 NAME
4 4
 
2  plugins/check_norelay
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 =pod
3 3
 
4 4
 =head1 SYNOPSIS
2  plugins/check_relay
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 
3 3
 # this plugin checks the relayclients config file and
4 4
 # $ENV{RELAYCLIENT} to see if relaying is allowed.
2  plugins/check_spamhelo
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 =head1 NAME
3 3
 
4 4
 check_spamhelo - Check a HELO message delivered from a connecting host.
2  plugins/connection_time
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 
3 3
 =head1 NAME
4 4
 
2  plugins/content_log
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 
3 3
 # A simple example of a plugin that logs all incoming mail to a file.
4 4
 # Useful for debugging other plugins or keeping an archive of things.
2  plugins/count_unrecognized_commands
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 
3 3
 =head1 NAME
4 4
 
2  plugins/dns_whitelist_soft
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 =head1 NAME
3 3
 
4 4
 dns_whitelist_soft - dns-based whitelist override for other qpsmtpd plugins
2  plugins/dnsbl
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 
3 3
 =head1 NAME
4 4
 
2  plugins/domainkeys
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 sub init {
3 3
     my ($self, $qp, %args) = @_;
4 4
 
2  plugins/dont_require_anglebrackets
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
  
3 3
 =head1 NAME
4 4
 
2  plugins/dspam
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 
3 3
 =head1 NAME
4 4
 
2  plugins/greylisting
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 =head1 NAME
3 3
 
4 4
 denysoft_greylist
2  plugins/help
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 
3 3
 =head1 NAME
4 4
 
2  plugins/hosts_allow
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 
3 3
 =head1 NAME 
4 4
 
2  plugins/http_config
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 =head1 NAME
3 3
 
4 4
 http_config
2  plugins/ident/geoip
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 
3 3
 =head1 SYNOPSIS
4 4
 
2  plugins/ident/p0f
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 
3 3
 =head1 NAME
4 4
 
2  plugins/logging/adaptive
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 # Adaptive logging plugin - logs at one level for successful messages and
3 3
 # one level for DENY'd messages
4 4
 
2  plugins/logging/apache
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 
3 3
 =head1 NAME
4 4
 
2  plugins/logging/connection_id
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 # this is a simple 'connection_id' plugin like the default builtin logging
3 3
 #
4 4
 # It demonstrates that a logging plugin can call ->log itself as well
2  plugins/logging/devnull
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 # this is a simple 'drop packets on the floor' plugin
3 3
 
4 4
 sub hook_logging {
2  plugins/logging/file
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 
3 3
 =head1 NAME
4 4
 
2  plugins/logging/syslog
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 
3 3
 =head1 NAME
4 4
 
2  plugins/logging/transaction_id
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 # this is a simple 'transaction_id' plugin like the default builtin logging
3 3
 #
4 4
 # It demonstrates that a logging plugin can call ->log itself as well
2  plugins/logging/warn
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 # this is a simple 'warn' plugin like the default builtin logging
3 3
 #
4 4
 # It demonstrates that a logging plugin can call ->log itself as well
2  plugins/milter
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 =head1 NAME
3 3
 
4 4
 milter
2  plugins/noop_counter
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 
3 3
 =head1 NAME
4 4
 
2  plugins/parse_addr_withhelo
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 
3 3
 =head1 NAME
4 4
 
2  plugins/queue/exim-bsmtp
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 =head1 NAME
3 3
 
4 4
 exim-bsmtp
2  plugins/queue/maildir
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 
3 3
 =head1 NAME
4 4
 
2  plugins/queue/postfix-queue
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 
3 3
 =head1 NAME
4 4
 
2  plugins/queue/qmail-queue
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 
3 3
 =head1 NAME
4 4
 
2  plugins/queue/smtp-forward
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 =head1 NAME
3 3
 
4 4
 smtp-forward
2  plugins/quit_fortune
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 
3 3
 sub hook_quit {
4 4
   my $qp = shift->qp;
2  plugins/random_error
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 =head1 NAME
3 3
 
4 4
 random_error
2  plugins/rcpt_map
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 
3 3
 =head1 NAME
4 4
 
2  plugins/rcpt_ok
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 
3 3
 =head1 NAME
4 4
 
2  plugins/rcpt_regexp
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 =head1 NAME
3 3
 
4 4
 rcpt_regexp - check recipients against a list of regular expressions
2  plugins/relay_only
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 
3 3
 =head1 NAME
4 4
 
2  plugins/require_resolvable_fromhost
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 use Qpsmtpd::DSN;
3 3
 use Net::DNS qw(mx);
4 4
 use Socket;
2  plugins/rhsbl
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 
3 3
 sub register {
4 4
   my ($self, $qp, $denial ) = @_;
2  plugins/sender_permitted_from
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 
3 3
 =head1 NAME
4 4
 
2  plugins/spamassassin
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 
3 3
 =head1 NAME
4 4
 
2  plugins/tls
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 
3 3
 =head1 NAME
4 4
 
2  plugins/tls_cert
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 use warnings;
3 3
 
4 4
 # Very basic script to create TLS certificates for qpsmtpd
2  plugins/uribl
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 
3 3
 =head1 NAME
4 4
 
2  plugins/virus/aveclient
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 =head1 NAME
3 3
 
4 4
 aveclient
2  plugins/virus/bitdefender
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 
3 3
 =head1 NAME
4 4
 
2  plugins/virus/clamav
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 
3 3
 =head1 NAME
4 4
 
2  plugins/virus/clamdscan
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 
3 3
 =head1 NAME
4 4
 
2  plugins/virus/hbedv
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 # H+B EDV-AV plugin.
3 3
 
4 4
 =head1 NAME
2  plugins/virus/kavscanner
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 # Kasperski-AV plugin.
3 3
 
4 4
 =head1 NAME
2  plugins/virus/klez_filter
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 
3 3
 sub hook_data_post {
4 4
   my ($self, $transaction) = @_;
2  plugins/virus/sophie
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 use IO::Socket;
3 3
 
4 4
 sub register {
2  plugins/virus/uvscan
... ...
@@ -1,4 +1,4 @@
1  
-#!perl -Tw
  1
+#!perl -w
2 2
 
3 3
 =head1 NAME
4 4
 
7  t/01-syntax.t
@@ -16,6 +16,10 @@ my @skip_syntax = qw(
16 16
   plugins/auth/auth_ldap_bind
17 17
   plugins/ident/geoip
18 18
   plugins/logging/apache
  19
+  plugins/auth/auth_vpopmail
  20
+  plugins/virus/clamdscan
  21
+  plugins/sender_permitted_from
  22
+  plugins/domainkeys
19 23
   lib/Apache/Qpsmtpd.pm
20 24
   lib/Danga/Client.pm
21 25
   lib/Danga/TimeoutSocket.pm
@@ -33,8 +37,9 @@ sub test_syntax {
33 37
   chomp $f;
34 38
   return if ! -f $f;
35 39
   return if $skip_syntax{$f};
  40
+  return if $f =~ m/(~|\.(bak|orig|rej))/;
36 41
   return if $f =~ /async/;   # requires ParaDNS
37  
-  my $r = `$this_perl -Tc $f 2>&1`;
  42
+  my $r = `$this_perl -Ilib -MQpsmtpd::Constants -c $f 2>&1`;
38 43
   my $exit_code = sprintf ("%d", $CHILD_ERROR >> 8);
39 44
   ok( $exit_code == 0, "syntax $f");
40 45
 };

0 notes on commit a23d4b3

Please sign in to comment.
Something went wrong with that request. Please try again.