Skip to content

Commit

Permalink
[dev] Moved tests on PODs to xt/ for tests interested by authors. The…
Browse files Browse the repository at this point in the history
… tests under xt/ will be invoked by "make authorcheck".

git-svn-id: https://subversion.renater.fr/sympa/branches/sympa-6.2-branch@11963 05aa8bb8-cd2b-0410-b1d7-8918dfa770ce
  • Loading branch information
sikeda committed Feb 16, 2015
1 parent 4729cff commit c6014e5
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 35 deletions.
2 changes: 1 addition & 1 deletion META.json.pl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
version => Sympa::Constants::VERSION(),

# Optional fields
no_index => {directory => [qw(po t www)],},
no_index => {directory => [qw(po t www xt)],},
optional_features => {}, # See below
prereqs => {}, # See below
resources => {
Expand Down
26 changes: 19 additions & 7 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,22 @@ check_DATA = t/locale/cs/LC_MESSAGES/sympa.mo \
t/locale/cs/LC_MESSAGES/web_help.mo \
t/locale/zh_TW/LC_MESSAGES/sympa.mo \
t/stub/Sympa/Constants.pm
authorcheck_SCRIPTS = \
xt/pod-coverage.t \
xt/pod-spelling.t \
xt/pod-syntax.t
authorcheckdir = xt

EXTRA_DIST = \
important_changes.pl \
META.json.pl \
META.json \
sympa.spec.pl \
sympa.spec \
etc_README \
$(check_SCRIPTS) $(check_DATA) \
$(authorcheck_SCRIPTS)

EXTRA_DIST = important_changes.pl \
META.json.pl \
META.json \
sympa.spec.pl \
sympa.spec \
etc_README \
$(check_SCRIPTS) $(check_DATA)
CLEANFILES = META.json previous_sympa_version sympa.spec sympa_wizard.pl.inst

MSGFMT=@MSGFMT@
Expand All @@ -56,6 +64,10 @@ check-local:
PERL5LIB=src/lib; export PERL5LIB; \
$(PERL) -MTest::Harness -e 'runtests @ARGV' $$TEST_FILES

authorcheck:
PERL5LIB=src/lib; export PERL5LIB; \
$(PERL) -MTest::Harness -e 'runtests @ARGV' $(authorcheck_SCRIPTS)

install-data-hook: installdir installconfig nextstep importantchanges

installdir:
Expand Down
9 changes: 0 additions & 9 deletions t/pod-coverage.t → xt/pod-coverage.t
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,15 @@

use strict;
use warnings;

use FindBin qw($Bin);
use lib "$Bin/../src/lib";

use English qw(-no_match_vars);
use Test::More;

plan(skip_all => 'Author test, set $ENV{TEST_AUTHOR} to a true value to run')
if !$ENV{TEST_AUTHOR};

eval {
require Test::Pod::Coverage;
Test::Pod::Coverage->import();
};
plan(skip_all => 'Test::Pod::Coverage required') if $EVAL_ERROR;

chdir "$Bin/..";

# Test::Pod::Coverage hardcodes 'lib' as prefix, whereas we use 'src/lib'
my @modules = map {
s/^src::lib:://; $_
Expand Down
9 changes: 0 additions & 9 deletions t/pod-spelling.t → xt/pod-spelling.t
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,9 @@

use strict;
use warnings;

use FindBin qw($Bin);
use lib "$Bin/../src/lib";

use English qw(-no_match_vars);
use Test::More;

plan(skip_all => 'Author test, set $ENV{TEST_AUTHOR} to a true value to run')
if !$ENV{TEST_AUTHOR};

eval {
require Test::Pod;
Test::Pod->import();
Expand All @@ -27,8 +20,6 @@ eval {
};
plan(skip_all => 'Test::Pod::Spelling::CommonMistakes required') if $EVAL_ERROR;

chdir "$Bin/..";

my @files = all_pod_files('src/lib');

all_pod_files_ok(@files);
9 changes: 0 additions & 9 deletions t/pod-syntax.t → xt/pod-syntax.t
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,15 @@

use strict;
use warnings;

use FindBin qw($Bin);
use lib "$Bin/../src/lib";

use English qw(-no_match_vars);
use Test::More;

plan(skip_all => 'Author test, set $ENV{TEST_AUTHOR} to a true value to run')
if !$ENV{TEST_AUTHOR};

eval {
require Test::Pod;
Test::Pod->import();
};
plan(skip_all => 'Test::Pod required') if $EVAL_ERROR;

chdir "$Bin/..";

my @files = all_pod_files(
'src/lib',
'src/bin',
Expand Down

0 comments on commit c6014e5

Please sign in to comment.