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,
'Time::HiRes' => 0,
'Net::IP' => 0,
'Date::Parse' => 0,
},
ABSTRACT => 'Flexible smtpd daemon written in Perl',
AUTHOR => 'Ask Bjoern Hansen <ask@develooper.com>',

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,4 +1,4 @@
#!perl -Tw
#!perl -w
=head1 NAME
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

View File

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

View File

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

View File

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

View File

@ -1,4 +1,4 @@
#!perl -Tw
#!perl -w
=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.
# Useful for debugging other plugins or keeping an archive of things.

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,4 +1,4 @@
#!perl -Tw
#!perl -w
# this is a simple 'connection_id' plugin like the default builtin logging
#
# 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
sub hook_logging {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -16,6 +16,10 @@ my @skip_syntax = qw(
plugins/auth/auth_ldap_bind
plugins/ident/geoip
plugins/logging/apache
plugins/auth/auth_vpopmail
plugins/virus/clamdscan
plugins/sender_permitted_from
plugins/domainkeys
lib/Apache/Qpsmtpd.pm
lib/Danga/Client.pm
lib/Danga/TimeoutSocket.pm
@ -33,8 +37,9 @@ sub test_syntax {
chomp $f;
return if ! -f $f;
return if $skip_syntax{$f};
return if $f =~ m/(~|\.(bak|orig|rej))/;
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);
ok( $exit_code == 0, "syntax $f");
};