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
This commit is contained in:
Ask Bjørn Hansen 2012-04-29 01:35:59 -07:00
parent d8467d784b
commit a23d4b3da9
80 changed files with 85 additions and 79 deletions

View File

@ -14,6 +14,7 @@ WriteMakefile(
'File::Temp' => 0, 'File::Temp' => 0,
'Time::HiRes' => 0, 'Time::HiRes' => 0,
'Net::IP' => 0, 'Net::IP' => 0,
'Date::Parse' => 0,
}, },
ABSTRACT => 'Flexible smtpd daemon written in Perl', ABSTRACT => 'Flexible smtpd daemon written in Perl',
AUTHOR => 'Ask Bjoern Hansen <ask@develooper.com>', AUTHOR => 'Ask Bjoern Hansen <ask@develooper.com>',

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
=head1 NAME =head1 NAME

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
use Qpsmtpd::Plugin::Async::DNSBLBase; use Qpsmtpd::Plugin::Async::DNSBLBase;

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
use Qpsmtpd::Plugin::Async::DNSBLBase; use Qpsmtpd::Plugin::Async::DNSBLBase;

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
=head1 NAME =head1 NAME

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
use Qpsmtpd::DSN; use Qpsmtpd::DSN;
use ParaDNS; use ParaDNS;

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
use Qpsmtpd::Plugin::Async::DNSBLBase; use Qpsmtpd::Plugin::Async::DNSBLBase;

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
use Qpsmtpd::Plugin::Async::DNSBLBase; use Qpsmtpd::Plugin::Async::DNSBLBase;

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
=head1 NAME =head1 NAME

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
=head1 NAME =head1 NAME

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
=head1 NAME =head1 NAME

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
sub register { sub register {
my ( $self, $qp, @args ) = @_; my ( $self, $qp, @args ) = @_;

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
use strict; use strict;
=head1 NAME =head1 NAME

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
=head1 NAME =head1 NAME

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
use strict; use strict;
use warnings; use warnings;

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
=head1 NAME =head1 NAME

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
=head1 NAME =head1 NAME

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
=head1 NAME =head1 NAME

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
# this plugin checks the badrcptto config (like badmailfrom, but for rcpt address # this plugin checks the badrcptto config (like badmailfrom, but for rcpt address
# rather than sender address) # rather than sender address)

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
=pod =pod
=head1 SYNOPSIS =head1 SYNOPSIS

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
=head1 NAME =head1 NAME

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
=head1 NAME =head1 NAME

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
=head1 NAME =head1 NAME
check_earlytalker - Check that the client doesn't talk before we send the SMTP banner check_earlytalker - Check that the client doesn't talk before we send the SMTP banner

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
=head1 NAME =head1 NAME

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
=pod =pod
=head1 SYNOPSIS =head1 SYNOPSIS

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
# this plugin checks the relayclients config file and # this plugin checks the relayclients config file and
# $ENV{RELAYCLIENT} to see if relaying is allowed. # $ENV{RELAYCLIENT} to see if relaying is allowed.

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
=head1 NAME =head1 NAME
check_spamhelo - Check a HELO message delivered from a connecting host. check_spamhelo - Check a HELO message delivered from a connecting host.

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
=head1 NAME =head1 NAME

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
# A simple example of a plugin that logs all incoming mail to a file. # A simple example of a plugin that logs all incoming mail to a file.
# Useful for debugging other plugins or keeping an archive of things. # Useful for debugging other plugins or keeping an archive of things.

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
=head1 NAME =head1 NAME

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
=head1 NAME =head1 NAME
dns_whitelist_soft - dns-based whitelist override for other qpsmtpd plugins dns_whitelist_soft - dns-based whitelist override for other qpsmtpd plugins

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
=head1 NAME =head1 NAME

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
sub init { sub init {
my ($self, $qp, %args) = @_; my ($self, $qp, %args) = @_;

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
=head1 NAME =head1 NAME

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
=head1 NAME =head1 NAME

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
=head1 NAME =head1 NAME
denysoft_greylist denysoft_greylist

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
=head1 NAME =head1 NAME

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
=head1 NAME =head1 NAME

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
=head1 NAME =head1 NAME
http_config http_config

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
=head1 SYNOPSIS =head1 SYNOPSIS

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
=head1 NAME =head1 NAME

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
# Adaptive logging plugin - logs at one level for successful messages and # Adaptive logging plugin - logs at one level for successful messages and
# one level for DENY'd messages # one level for DENY'd messages

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
=head1 NAME =head1 NAME

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
# this is a simple 'connection_id' plugin like the default builtin logging # this is a simple 'connection_id' plugin like the default builtin logging
# #
# It demonstrates that a logging plugin can call ->log itself as well # It demonstrates that a logging plugin can call ->log itself as well

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
# this is a simple 'drop packets on the floor' plugin # this is a simple 'drop packets on the floor' plugin
sub hook_logging { sub hook_logging {

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
=head1 NAME =head1 NAME

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
=head1 NAME =head1 NAME

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
# this is a simple 'transaction_id' plugin like the default builtin logging # this is a simple 'transaction_id' plugin like the default builtin logging
# #
# It demonstrates that a logging plugin can call ->log itself as well # It demonstrates that a logging plugin can call ->log itself as well

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
# this is a simple 'warn' plugin like the default builtin logging # this is a simple 'warn' plugin like the default builtin logging
# #
# It demonstrates that a logging plugin can call ->log itself as well # It demonstrates that a logging plugin can call ->log itself as well

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
=head1 NAME =head1 NAME
milter milter

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
=head1 NAME =head1 NAME

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
=head1 NAME =head1 NAME

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
=head1 NAME =head1 NAME
exim-bsmtp exim-bsmtp

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
=head1 NAME =head1 NAME

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
=head1 NAME =head1 NAME

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
=head1 NAME =head1 NAME

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
=head1 NAME =head1 NAME
smtp-forward smtp-forward

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
sub hook_quit { sub hook_quit {
my $qp = shift->qp; my $qp = shift->qp;

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
=head1 NAME =head1 NAME
random_error random_error

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
=head1 NAME =head1 NAME

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
=head1 NAME =head1 NAME

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
=head1 NAME =head1 NAME
rcpt_regexp - check recipients against a list of regular expressions rcpt_regexp - check recipients against a list of regular expressions

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
=head1 NAME =head1 NAME

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
use Qpsmtpd::DSN; use Qpsmtpd::DSN;
use Net::DNS qw(mx); use Net::DNS qw(mx);
use Socket; use Socket;

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
sub register { sub register {
my ($self, $qp, $denial ) = @_; my ($self, $qp, $denial ) = @_;

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
=head1 NAME =head1 NAME

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
=head1 NAME =head1 NAME

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
=head1 NAME =head1 NAME

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
use warnings; use warnings;
# Very basic script to create TLS certificates for qpsmtpd # Very basic script to create TLS certificates for qpsmtpd

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
=head1 NAME =head1 NAME

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
=head1 NAME =head1 NAME
aveclient aveclient

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
=head1 NAME =head1 NAME

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
=head1 NAME =head1 NAME

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
=head1 NAME =head1 NAME

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
# H+B EDV-AV plugin. # H+B EDV-AV plugin.
=head1 NAME =head1 NAME

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
# Kasperski-AV plugin. # Kasperski-AV plugin.
=head1 NAME =head1 NAME

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
sub hook_data_post { sub hook_data_post {
my ($self, $transaction) = @_; my ($self, $transaction) = @_;

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
use IO::Socket; use IO::Socket;
sub register { sub register {

View File

@ -1,4 +1,4 @@
#!perl -Tw #!perl -w
=head1 NAME =head1 NAME

View File

@ -16,6 +16,10 @@ my @skip_syntax = qw(
plugins/auth/auth_ldap_bind plugins/auth/auth_ldap_bind
plugins/ident/geoip plugins/ident/geoip
plugins/logging/apache plugins/logging/apache
plugins/auth/auth_vpopmail
plugins/virus/clamdscan
plugins/sender_permitted_from
plugins/domainkeys
lib/Apache/Qpsmtpd.pm lib/Apache/Qpsmtpd.pm
lib/Danga/Client.pm lib/Danga/Client.pm
lib/Danga/TimeoutSocket.pm lib/Danga/TimeoutSocket.pm
@ -33,8 +37,9 @@ sub test_syntax {
chomp $f; chomp $f;
return if ! -f $f; return if ! -f $f;
return if $skip_syntax{$f}; return if $skip_syntax{$f};
return if $f =~ m/(~|\.(bak|orig|rej))/;
return if $f =~ /async/; # requires ParaDNS return if $f =~ /async/; # requires ParaDNS
my $r = `$this_perl -Tc $f 2>&1`; my $r = `$this_perl -Ilib -MQpsmtpd::Constants -c $f 2>&1`;
my $exit_code = sprintf ("%d", $CHILD_ERROR >> 8); my $exit_code = sprintf ("%d", $CHILD_ERROR >> 8);
ok( $exit_code == 0, "syntax $f"); ok( $exit_code == 0, "syntax $f");
}; };