diff --git a/t/Test/Qpsmtpd.pm b/t/Test/Qpsmtpd.pm index 0630692..c24cbe1 100644 --- a/t/Test/Qpsmtpd.pm +++ b/t/Test/Qpsmtpd.pm @@ -103,7 +103,7 @@ sub varlog { # sub disconnect sub run_plugin_tests { - my $self = shift; + my ($self, $only_plugin) = @_; $self->{_test_mode} = 1; my @plugins = $self->load_plugins(); @@ -111,6 +111,7 @@ sub run_plugin_tests { my $Test = Test::Builder->new(); foreach my $plugin (@plugins) { + next if ($only_plugin && $plugin !~ /$only_plugin/); $plugin->register_tests(); $plugin->run_tests($self); } diff --git a/t/plugin_tests.t b/t/plugin_tests.t index c514d4c..b5f2e65 100644 --- a/t/plugin_tests.t +++ b/t/plugin_tests.t @@ -5,7 +5,7 @@ use Test::Qpsmtpd; my $qp = Test::Qpsmtpd->new(); -$qp->run_plugin_tests(); +$qp->run_plugin_tests($ARGV[0]); foreach my $file ("./t/config/greylist.dbm", "./t/config/greylist.dbm.lock") { next if !-f $file;