Hello community,
here is the log from the commit of package perl-Test-Manifest for openSUSE:Factory checked in at 2015-04-18 10:38:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Test-Manifest (Old)
and /work/SRC/openSUSE:Factory/.perl-Test-Manifest.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Test-Manifest"
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Test-Manifest/perl-Test-Manifest.changes 2011-11-21 12:47:37.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.perl-Test-Manifest.new/perl-Test-Manifest.changes 2015-04-18 10:38:57.000000000 +0200
@@ -1,0 +2,20 @@
+Tue Apr 14 18:13:57 UTC 2015 - coolo@suse.com
+
+- updated to 2.02
+ see /usr/share/doc/packages/perl-Test-Manifest/Changes
+
+ Changes for Test::Manifest
+
+ 2.02 - Tue Aug 26 13:01:43 2014
+ Fix rt.cpan.org #98288: fix a spelling mistake
+
+ 2.00_001 - Thu Jul 11 20:22:40 2013
+ * Switch back to Makefile.PL—so much simpler
+
+ 2.00_01 - Wed Jul 20 01:02:11 2011
+ * Work with Module::Build by supplying a subclass.
+
+ 1.23 - Fri Jul 17 03:04:38 2009
+ * Move everything to git and finally make a release
+
+-------------------------------------------------------------------
Old:
----
Test-Manifest-1.23.tar.gz
New:
----
Test-Manifest-2.02.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Test-Manifest.spec ++++++
--- /var/tmp/diff_new_pack.3XNSch/_old 2015-04-18 10:38:58.000000000 +0200
+++ /var/tmp/diff_new_pack.3XNSch/_new 2015-04-18 10:38:58.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package perl-Test-Manifest
#
-# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -15,41 +15,47 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
-# norootforbuild
-
Name: perl-Test-Manifest
+Version: 2.02
+Release: 0
%define cpan_name Test-Manifest
-Summary: Interact with a t/test_manifest file
-Version: 1.23
-Release: 3
-License: GPL-1.0+ or Artistic-1.0
+Summary: interact with a t/test_manifest file
+License: Artistic-1.0 or GPL-1.0+
Group: Development/Libraries/Perl
Url: http://search.cpan.org/dist/Test-Manifest/
-Source: http://www.cpan.org/modules/by-module/Test/Test-Manifest-%{version}.tar.gz
+Source: http://www.cpan.org/authors/id/B/BD/BDFOY/%{cpan_name}-%{version}.tar.gz
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-%{perl_requires}
BuildRequires: perl
BuildRequires: perl-macros
-BuildRequires: perl(Test::More)
+BuildRequires: perl(Test::More) >= 0.95
+Requires: perl(Test::More) >= 0.95
+%{perl_requires}
%description
-Test::Harness assumes that you want to run all of the .t files in the t/
-directory in ascii-betical order during make test unless you say otherwise.
-This leads to some interesting naming schemes for test files to get them in
-the desired order. This interesting names ossify when they get into source
-control, and get even more interesting as more tests show up.
-
-Test::Manifest overrides the default behaviour by replacing the
-test_via_harness target in the Makefile. Instead of running at the t/*.t
-files in ascii-betical order, it looks in the t/test_manifest file to
-find out which tests you want to run and the order in which you want
-to run them. It constructs the right value for MakeMaker to do the right thing.
-
-Authors:
---------
- brian d foy,
+'Test::Harness' assumes that you want to run all of the _.t_ files in the
+_t/_ directory in ASCII-betical order during 'make test' or './Build test'
+unless you say otherwise. This leads to some interesting naming schemes for
+test files to get them in the desired order. These interesting names ossify
+when they get into source control, and get even more interesting as more
+tests show up.
+
+'Test::Manifest' overrides the default test file order. Instead of running
+all of the _t/*.t_ files in ASCII-betical order, it looks in the
+_t/test_manifest_ file to find out which tests you want to run and the
+order in which you want to run them. It constructs the right value for the
+build system to do the right thing.
+
+In _t/test_manifest_, simply list the tests that you want to run. Their
+order in the file is the order in which they run. You can comment lines
+with a '#', just like in Perl, and 'Test::Manifest' will strip leading and
+trailing whitespace from each line. It also checks that the specified file
+is actually in the _t/_ directory. If the file does not exist, it does not
+put its name in the list of test files to run and it will issue a warning.
+
+Optionally, you can add a number after the test name in test_manifest to
+define sets of tests. See 'get_t_files' for more information.
%prep
%setup -q -n %{cpan_name}-%{version}
@@ -63,18 +69,11 @@
%install
%perl_make_install
-# do not perl_process_packlist (noarch)
-# remove .packlist file
-%{__rm} -rf $RPM_BUILD_ROOT%perl_vendorarch
-# remove perllocal.pod file
-%{__rm} -rf $RPM_BUILD_ROOT%perl_archlib
+%perl_process_packlist
%perl_gen_filelist
-%clean
-%{__rm} -rf $RPM_BUILD_ROOT
-
%files -f %{name}.files
-%defattr(-,root,root,-)
-%doc Changes LICENSE README test_manifest test_manifest_levels test_manifest_with_include
+%defattr(-,root,root,755)
+%doc Changes examples LICENSE README test_manifest test_manifest_levels test_manifest_with_include
%changelog
++++++ Test-Manifest-1.23.tar.gz -> Test-Manifest-2.02.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Manifest-1.23/Changes new/Test-Manifest-2.02/Changes
--- old/Test-Manifest-1.23/Changes 2009-07-17 10:05:50.000000000 +0200
+++ new/Test-Manifest-2.02/Changes 2014-08-26 19:02:00.000000000 +0200
@@ -1,12 +1,23 @@
+Changes for Test::Manifest
+
+2.02 - Tue Aug 26 13:01:43 2014
+ Fix rt.cpan.org #98288: fix a spelling mistake
+
+2.00_001 - Thu Jul 11 20:22:40 2013
+ * Switch back to Makefile.PL—so much simpler
+
+2.00_01 - Wed Jul 20 01:02:11 2011
+ * Work with Module::Build by supplying a subclass.
+
+1.23 - Fri Jul 17 03:04:38 2009
+ * Move everything to git and finally make a release
+
1.22_03 - Tue Jul 29 21:14:49 2008
* Fixed bug for missing file: previously the missing file
name was passed through to run_t_files, although without
the t/ added to its path. Test::Manifest should only
warn about and skip missing files.
-1.23 - Fri Jul 17 03:04:38 2009
- * Move everything to git and finally make a release
-
1.22_02 - Thu Jan 24 06:13:13 2008
* File path and unlink fixes for VMS (RT #32061). Let's see if this works.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Manifest-1.23/MANIFEST new/Test-Manifest-2.02/MANIFEST
--- old/Test-Manifest-1.23/MANIFEST 2009-07-17 10:05:52.000000000 +0200
+++ new/Test-Manifest-2.02/MANIFEST 2014-08-26 19:02:00.000000000 +0200
@@ -1,9 +1,12 @@
Changes
examples/README
-lib/Manifest.pm
+lib/Test/Manifest.pm
LICENSE
Makefile.PL
MANIFEST This list of files
+MANIFEST.SKIP
+META.json
+META.yml
README
t/00load.t
t/01get_test_files.t
@@ -13,8 +16,8 @@
t/include_in_manifest.txt
t/leading_space.t
t/pod_coverage.t
+t/test_manifest
t/trailing_space.t
test_manifest
test_manifest_levels
test_manifest_with_include
-META.yml Module meta-data (added by MakeMaker)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Manifest-1.23/MANIFEST.SKIP new/Test-Manifest-2.02/MANIFEST.SKIP
--- old/Test-Manifest-1.23/MANIFEST.SKIP 1970-01-01 01:00:00.000000000 +0100
+++ new/Test-Manifest-2.02/MANIFEST.SKIP 2014-08-26 19:02:00.000000000 +0200
@@ -0,0 +1,64 @@
+
+#!start included /usr/local/perls/perl-5.18.1/lib/5.18.1/ExtUtils/MANIFEST.SKIP
+# Avoid version control files.
+\bRCS\b
+\bCVS\b
+\bSCCS\b
+,v$
+\B\.svn\b
+\B\.git\b
+\B\.gitignore\b
+\b_darcs\b
+\B\.cvsignore$
+
+# Avoid VMS specific MakeMaker generated files
+\bDescrip.MMS$
+\bDESCRIP.MMS$
+\bdescrip.mms$
+
+# Avoid Makemaker generated and utility files.
+\bMANIFEST\.bak
+\bMakefile$
+\bblib/
+\bMakeMaker-\d
+\bpm_to_blib\.ts$
+\bpm_to_blib$
+\bblibdirs\.ts$ # 6.18 through 6.25 generated this
+
+# Avoid Module::Build generated and utility files.
+\bBuild$
+\b_build/
+\bBuild.bat$
+\bBuild.COM$
+\bBUILD.COM$
+\bbuild.com$
+
+# Avoid temp and backup files.
+~$
+\.old$
+\#$
+\b\.#
+\.bak$
+\.tmp$
+\.#
+\.rej$
+
+# Avoid OS-specific files/dirs
+# Mac OSX metadata
+\B\.DS_Store
+# Mac OSX SMB mount metadata files
+\B\._
+
+# Avoid Devel::Cover and Devel::CoverX::Covered files.
+\bcover_db\b
+\bcovered\b
+
+# Avoid MYMETA files
+^MYMETA\.
+#!end included /usr/local/perls/perl-5.18.1/lib/5.18.1/ExtUtils/MANIFEST.SKIP
+
+.travis.yml
+.releaserc
+.lwpcookies
+Test-Manifest-.*
+hacks/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Manifest-1.23/META.json new/Test-Manifest-2.02/META.json
--- old/Test-Manifest-1.23/META.json 1970-01-01 01:00:00.000000000 +0100
+++ new/Test-Manifest-2.02/META.json 2014-08-26 19:02:02.000000000 +0200
@@ -0,0 +1,55 @@
+{
+ "abstract" : "Interact with a t/test_manifest file",
+ "author" : [
+ "brian d foy "
+ ],
+ "dynamic_config" : 1,
+ "generated_by" : "ExtUtils::MakeMaker version 6.86, CPAN::Meta::Converter version 2.120921",
+ "keywords" : [
+ "module",
+ "distribution",
+ "test"
+ ],
+ "license" : [
+ "perl_5"
+ ],
+ "meta-spec" : {
+ "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
+ "version" : "2"
+ },
+ "name" : "Test-Manifest",
+ "no_index" : {
+ "directory" : [
+ "t",
+ "inc"
+ ]
+ },
+ "prereqs" : {
+ "build" : {
+ "requires" : {
+ "ExtUtils::MakeMaker" : "0"
+ }
+ },
+ "configure" : {
+ "requires" : {
+ "ExtUtils::MakeMaker" : "0"
+ }
+ },
+ "runtime" : {
+ "requires" : {
+ "Test::More" : "0.95",
+ "perl" : "5.006"
+ }
+ }
+ },
+ "release_status" : "stable",
+ "resources" : {
+ "bugtracker" : {
+ "web" : "http://rt.cpan.org/NoAuth/Bugs.html?Dist=Test-Manifest"
+ },
+ "repository" : {
+ "url" : "git://github.com/briandfoy/test-manifest.git"
+ }
+ },
+ "version" : "2.02"
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Manifest-1.23/META.yml new/Test-Manifest-2.02/META.yml
--- old/Test-Manifest-1.23/META.yml 2009-07-17 10:05:52.000000000 +0200
+++ new/Test-Manifest-2.02/META.yml 2014-08-26 19:02:02.000000000 +0200
@@ -1,23 +1,30 @@
---- #YAML:1.0
-name: Test-Manifest
-version: 1.23
-abstract: interact with a t/test_manifest file
+---
+abstract: 'Interact with a t/test_manifest file'
author:
- - brian d foy
-license: perl
-distribution_type: module
-configure_requires:
- ExtUtils::MakeMaker: 0
+ - 'brian d foy '
build_requires:
- ExtUtils::MakeMaker: 0
-requires:
- ExtUtils::MakeMaker: 6.03
- Test::More: 0
-no_index:
- directory:
- - t
- - inc
-generated_by: ExtUtils::MakeMaker version 6.50
+ ExtUtils::MakeMaker: 0
+configure_requires:
+ ExtUtils::MakeMaker: 0
+dynamic_config: 1
+generated_by: 'ExtUtils::MakeMaker version 6.86, CPAN::Meta::Converter version 2.120921'
+keywords:
+ - module
+ - distribution
+ - test
+license: perl
meta-spec:
- url: http://module-build.sourceforge.net/META-spec-v1.4.html
- version: 1.4
+ url: http://module-build.sourceforge.net/META-spec-v1.4.html
+ version: 1.4
+name: Test-Manifest
+no_index:
+ directory:
+ - t
+ - inc
+requires:
+ Test::More: 0.95
+ perl: 5.006
+resources:
+ bugtracker: http://rt.cpan.org/NoAuth/Bugs.html?Dist=Test-Manifest
+ repository: git://github.com/briandfoy/test-manifest.git
+version: 2.02
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Manifest-1.23/Makefile.PL new/Test-Manifest-2.02/Makefile.PL
--- old/Test-Manifest-1.23/Makefile.PL 2009-07-17 10:05:50.000000000 +0200
+++ new/Test-Manifest-2.02/Makefile.PL 2014-08-26 19:02:00.000000000 +0200
@@ -1,26 +1,31 @@
-use ExtUtils::MakeMaker;
+use ExtUtils::MakeMaker 6.48;
+use strict;
+use warnings;
require 5.006;
-WriteMakefile
- (
- 'NAME' => 'Test::Manifest',
- 'ABSTRACT' => 'interact with a t/test_manifest file',
- 'VERSION_FROM' => 'lib/Manifest.pm',
- 'LICENSE' => 'perl',
- 'AUTHOR' => 'brian d foy ',
-
- 'PREREQ_PM' => {
- 'Test::More' => '0',
- 'ExtUtils::MakeMaker' => '6.03',
- },
-
- 'PM' =>
- {
- 'lib/Manifest.pm' => '$(INST_LIBDIR)/Manifest.pm',
+eval "use Test::Manifest 1.21";
+
+WriteMakefile(
+ 'NAME' => 'Test::Manifest',
+ 'AUTHOR' => 'brian d foy ',
+ 'ABSTRACT' => 'Interact with a t/test_manifest file',
+ 'VERSION_FROM' => "lib/Test/Manifest.pm",
+ 'LICENSE' => 'perl',
+
+ 'PREREQ_PM' => {
+ 'Test::More' => '0.95',
},
-
- 'MAN3PODS' => {},
-
- clean => { FILES => 'Test-Manifest-* t/test_manifest' },
+
+ MIN_PERL_VERSION => 5.006,
+
+ META_MERGE => {
+ resources => {
+ bugtracker => 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=Test-Manifest',
+ repository => 'git://github.com/briandfoy/test-manifest.git',
+ },
+ keywords => [ 'module', 'distribution', 'test' ],
+ },
+
+ clean => { FILES => '*.bak release-* Test-*' },
);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Manifest-1.23/lib/Manifest.pm new/Test-Manifest-2.02/lib/Manifest.pm
--- old/Test-Manifest-1.23/lib/Manifest.pm 2009-07-17 10:05:50.000000000 +0200
+++ new/Test-Manifest-2.02/lib/Manifest.pm 1970-01-01 01:00:00.000000000 +0100
@@ -1,336 +0,0 @@
-package Test::Manifest;
-use strict;
-
-use warnings;
-no warnings;
-
-use base qw(Exporter);
-use vars qw(@EXPORT_OK @EXPORT $VERSION);
-
-use Carp qw(carp);
-use File::Spec::Functions qw(catfile);
-
-@EXPORT = qw(run_t_manifest);
-@EXPORT_OK = qw(get_t_files make_test_manifest manifest_name);
-
-$VERSION = '1.23';
-
-my $Manifest = catfile( "t", "test_manifest" );
-my %SeenInclude = ();
-my %SeenTest = ();
-
-require 5.006;
-
-sub MY::test_via_harness
- {
- my($self, $perl, $tests) = @_;
-
- return qq|\t$perl "-MTest::Manifest" | .
- qq|"-e" "run_t_manifest(\$(TEST_VERBOSE), '\$(INST_LIB)', | .
- qq|'\$(INST_ARCHLIB)', \$(TEST_LEVEL) )"\n|;
- };
-
-=head1 NAME
-
-Test::Manifest - interact with a t/test_manifest file
-
-=head1 SYNOPSIS
-
- # in Makefile.PL
- eval "use Test::Manifest";
-
- # in the file t/test_manifest, list the tests you want
- # to run
-
-=head1 DESCRIPTION
-
-CTest::Harness assumes that you want to run all of the F<.t> files in the
-F<t/> directory in ascii-betical order during C<make test> unless you say
-otherwise. This leads to some interesting naming schemes for test
-files to get them in the desired order. This interesting names ossify
-when they get into source control, and get even more interesting as
-more tests show up.
-
-CTest::Manifest overrides the default behaviour by replacing the
-test_via_harness target in the Makefile. Instead of running at the
-F files in ascii-betical order, it looks in the F
-file to find out which tests you want to run and the order in which
-you want to run them. It constructs the right value for MakeMaker to
-do the right thing.
-
-In F, simply list the tests that you want to run. Their
-order in the file is the order in which they run. You can comment
-lines with a C<#>, just like in Perl, and CTest::Manifest will strip
-leading and trailing whitespace from each line. It also checks that
-the specified file is actually in the F<t/> directory. If the file does
-not exist, it does not put its name in the list of test files to run and
-it will issue a warning.
-
-Optionally, you can add a number after the test name in test_manifest
-to define sets of tests. See C for more information.
-
-=head2 Functions
-
-=over 4
-
-=item run_t_manifest( TEST_VERBOSE, INST_LIB, INST_ARCHLIB, TEST_LEVEL )
-
-Run all of the files in t/test_manifest through Test::Harness:runtests
-in the order they appear in the file.
-
- eval "use Test::Manifest";
-
-=cut
-
-sub run_t_manifest
- {
- require Test::Harness;
- require File::Spec;
-
- $Test::Harness::verbose = shift;
-
- local @INC = @INC;
- unshift @INC, map { File::Spec->rel2abs($_) } @_[0,1];
-
- my( $level ) = $_[2] || 0;
-
- print STDERR "Test::Manifest $VERSION\n"
- if $Test::Harness::verbose;
-
- print STDERR "Level is $level\n"
- if $Test::Harness::verbose;
-
- my @files = get_t_files( $level );
- print STDERR "Test::Manifest::test_harness found [@files]\n"
- if $Test::Harness::verbose;
-
- Test::Harness::runtests( @files );
- }
-
-=item get_t_files( [LEVEL] )
-
-In scalar context it returns a single string that you can use directly
-in WriteMakefile(). In list context it returns a list of the files it
-found in t/test_manifest.
-
-If a t/test_manifest file does not exist, get_t_files() returns
-nothing.
-
-get_t_files() warns you if it can't find t/test_manifest, or if
-entries start with "t/". It skips blank lines, and strips Perl
-style comments from the file.
-
-Each line in t/test_manifest can have three parts: the test name,
-the test level (a floating point number), and a comment. By default,
-the test level is 1.
-
- test_name.t 2 #Run this only for level 2 testing
-
-Without an argument, get_t_files() returns all the test files it
-finds. With an argument that is true (so you can't use 0 as a level)
-and is a number, it skips tests with a level greater than that
-argument. You can then define sets of tests and choose a set to
-run. For instance, you might create a set for end users, but also
-add on a set for deeper testing for developers.
-
-Experimentally, you can include a command to grab test names from
-another file. The command starts with a C<;> to distinguish it
-from a true filename. The filename (currently) is relative to the
-current working directory, unlike the filenames, which are relative
-to C<t/>. The filenames in the included are still relative to C<t/>.
-
- ;include t/file_with_other_test_names.txt
-
-Also experimentally, you can stop Test::Manifest from reading filenames
-with the C<;skip> directive. Test::Harness will skip the filenames up to
-the C<;unskip> directive (or end of file)
-
- run_this1
- ;skip
- skip_this
- ;unskip
- run_this2
-
-To select sets of tests, specify the level in the variable TEST_LEVEL
-during `make test`.
-
- make test # run all tests no matter the level
- make test TEST_LEVEL=2 # run all tests level 2 and below
-
-=cut
-
-sub get_t_files
- {
- my $upper_bound = shift;
- print STDERR "# Test level is $upper_bound\n"
- if $Test::Harness::verbose;
-
- %SeenInclude = ();
- %SeenTest = ();
-
- carp( "$Manifest does not exist!" ) unless -e $Manifest;
- my $result = _load_test_manifest($Manifest, $upper_bound);
- return unless defined $result;
- my @tests = @{$result};
-
- return wantarray ? @tests : join " ", @tests;
- }
-
-# Wrapper for loading test manifest files to support including other files
-sub _load_test_manifest
- {
- my $manifest = shift;
- return unless open my( $fh ), $manifest;
-
- my $upper_bound = shift || 0;
- my @tests = ();
-
- LINE: while( <$fh> )
- {
- s/#.*//; s/^\s+//; s/\s+$//;
-
- next unless $_;
-
- my( $command, $arg ) = split/\s+/, $_, 2;
- if( ';' eq substr( $command, 0, 1 ) )
- {
- if( $command eq ';include' )
- {
- my $result = _include_file( $arg, $., $upper_bound );
- push @tests, @$result if defined $result;
- next;
- }
- elsif( $command eq ';skip' )
- {
- while( <$fh> ) { last if m/^;unskip/ }
- next LINE;
- }
- else
- {
- croak( "Unknown directive: $command" );
- }
- }
-
- my( $test, $level ) = ( $command, $arg );
- $level = 1 unless defined $level;
-
- next if( $upper_bound and $level > $upper_bound );
-
- carp( "Bad value for test [$test] level [$level]\n".
- "Level should be a floating-point number\n" )
- unless $level =~ m/^\d+(?:.\d+)?$/;
- carp( "test file begins with t/ [$test]" ) if m|^t/|;
-
- $test = catfile( "t", $test ) if -e catfile( "t", $test );
-
- unless( -e $test )
- {
- carp( "test file [$test] does not exist! Skipping!" );
- next;
- }
-
- # Make sure we don't include a test we've already seen
- next if exists $SeenTest{$test};
-
- $SeenTest{$test} = 1;
- push @tests, $test;
- }
-
- close $fh;
- return \@tests;
- }
-
-sub _include_file
- {
- my( $file, $line, $upper_bound ) = @_;
- print STDERR "# Including file $file at line $line\n"
- if $Test::Harness::verbose;
-
- unless( -e $file )
- {
- carp( "$file does not exist" ) ;
- return;
- }
-
- if( exists $SeenInclude{$file} )
- {
- carp( "$file already loaded - skipping" ) ;
- return;
- }
-
- $SeenInclude{$file} = $line;
-
- my $result = _load_test_manifest( $file, $upper_bound );
- return unless defined $result;
-
- $result;
- }
-
-
-=item make_test_manifest()
-
-Creates the test_manifest file in the t directory by reading
-the contents of the t directory.
-
-TO DO: specify tests in argument lists.
-
-TO DO: specify files to skip.
-
-=cut
-
-sub make_test_manifest()
- {
- carp( "t/ directory does not exist!" ) unless -d "t";
- return unless open my( $fh ), "> $Manifest";
-
- my $count = 0;
- while( my $file = glob("t/*.t") )
- {
- $file =~ s|^t/||;
- print $fh "$file\n";
- $count++;
- }
- close $fh;
-
- return $count;
- }
-
-=item manifest_name()
-
-Returns the name of the test manifest file, relative to t/
-
-=cut
-
-sub manifest_name
- {
- return $Manifest;
- }
-
-=back
-
-=head1 SOURCE AVAILABILITY
-
-This source is in Github:
-
- http://github.com/briandfoy/Test-Manifest/tree/master
-
-=head1 CREDITS
-
-Matt Vanderpol suggested and supplied a patch for the ;include
-feature.
-
-=head1 AUTHOR
-
-brian d foy, C<< >>
-
-=head1 COPYRIGHT AND LICENSE
-
-Copyright (c) 2002-2009 brian d foy. All rights reserved.
-
-This program is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself.
-
-=cut
-
-
-1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Manifest-1.23/lib/Test/Manifest.pm new/Test-Manifest-2.02/lib/Test/Manifest.pm
--- old/Test-Manifest-1.23/lib/Test/Manifest.pm 1970-01-01 01:00:00.000000000 +0100
+++ new/Test-Manifest-2.02/lib/Test/Manifest.pm 2014-08-26 19:02:00.000000000 +0200
@@ -0,0 +1,452 @@
+package Test::Manifest;
+use strict;
+
+use warnings;
+no warnings;
+
+use base qw(Exporter);
+use vars qw(@EXPORT_OK @EXPORT $VERSION);
+
+use Carp qw(carp);
+use File::Spec::Functions qw(catfile);
+
+@EXPORT = qw(run_t_manifest);
+@EXPORT_OK = qw(get_t_files make_test_manifest manifest_name);
+
+$VERSION = '2.02';
+
+my %SeenInclude = ();
+my %SeenTest = ();
+
+require 5.006;
+
+sub MY::test_via_harness {
+ my($self, $perl, $tests) = @_;
+
+ return qq|\t$perl "-MTest::Manifest" | .
+ qq|"-e" "run_t_manifest(\$(TEST_VERBOSE), '\$(INST_LIB)', | .
+ qq|'\$(INST_ARCHLIB)', \$(TEST_LEVEL) )"\n|;
+ };
+
+=head1 NAME
+
+Test::Manifest - interact with a t/test_manifest file
+
+=head1 SYNOPSIS
+
+ # in Makefile.PL
+ eval "use Test::Manifest 2.00";
+
+ # in Build.PL
+ my $class = do {
+ if( eval "Test::Manifest 2.00" ) {
+ Test::Manifest->get_module_build_subclass;
+ }
+ else {
+ 'Module::Build';
+ }
+ };
+
+ my $build = $class->new( ... )
+
+ # in the file t/test_manifest, list the tests you want
+ # to run in the order you want to run them
+
+=head1 DESCRIPTION
+
+CTest::Harness assumes that you want to run all of the F<.t> files
+in the F<t/> directory in ASCII-betical order during C<make test> or
+C<./Build test> unless you say otherwise. This leads to some
+interesting naming schemes for test files to get them in the desired
+order. These interesting names ossify when they get into source
+control, and get even more interesting as more tests show up.
+
+CTest::Manifest overrides the default test file order. Instead of
+running all of the F files in ASCII-betical order, it looks in
+the F file to find out which tests you want to run
+and the order in which you want to run them. It constructs the right
+value for the build system to do the right thing.
+
+In F, simply list the tests that you want to run.
+Their order in the file is the order in which they run. You can
+comment lines with a C<#>, just like in Perl, and CTest::Manifest
+will strip leading and trailing whitespace from each line. It also
+checks that the specified file is actually in the F<t/> directory. If
+the file does not exist, it does not put its name in the list of test
+files to run and it will issue a warning.
+
+Optionally, you can add a number after the test name in test_manifest
+to define sets of tests. See C for more information.
+
+=head2 ExtUtils::Makemaker
+
+To override the test order behaviour in C<Makemaker>, CTest::Manifest
+inserts itself in the C step by providing its own
+test runner. In C, all you have to do is load CTest::Manifest
+before you call C<WriteMakefile>. To make it optional, load it in an eval:
+
+ eval "use Test::Manifest";
+
+=head2 Module::Build
+
+Overiding parts of CModule::Build is tricker if you want to use the
+subclassing mechanism and still make CTest::Manifest optional. If you
+can load CTest::Manifest (version 2.00 or later), CTest::Manifest can
+create the subclass for you.
+
+ my $class = do {
+ if( eval 'Test::Manifest 2.00; 1' ) {
+ Test::Manifest->get_module_build_subclass;
+ }
+ else {
+ 'Module::Build' # if Test::Manifest isn't there
+ }
+ };
+
+ $class->new( ... );
+ $class->create_build_file;
+
+This is a bit of a problem when you already have your own subclass.
+CTest::Manifest overrides C, so you can get just
+that code to add to your own subclass code string:
+
+ my $code = eval 'Test::Manifest 2.00; 1'
+ ?
+ Test::Manifest->get_module_build_code_string
+ :
+ '';
+
+ my $class = Module::Build->subclass(
+ ...,
+ code => "$code\n...your subclass code string...",
+ );
+
+=head2 Class methods
+
+=over 4
+
+=item get_module_build_subclass
+
+For CModule::Build only.
+
+Returns a CModule::Build subclass that overrides C. If
+you want to have your own CModule::Build subclass and still use
+CTest::Manifest, you can get just the code string with
+C.
+
+=cut
+
+sub get_module_build_subclass {
+ my( $class ) = @_;
+
+
+ require Module::Build;
+
+ my $class = Module::Build->subclass(
+ class => 'Test::Manifest::MB',
+
+ code => $class->get_module_build_code_string,
+ );
+
+ $class->log_info( "Using Test::Manifest $VERSION\n" );
+
+ $class;
+ }
+
+=item get_module_build_code_string
+
+For CModule::Build only.
+
+Returns the overridden C as Perl code in a string suitable
+for the C<code> key in CModule::Build-subclass()>. You can add this to other
+bits you are overriding or extending.
+
+See CModule::Build::Base::find_test_files to see the base implementation.
+
+=cut
+
+sub get_module_build_code_string {
+ q{
+ sub find_test_files {
+ my $self = shift;
+ my $p = $self->{properties};
+
+ my( $level ) = grep { defined } (
+ $ENV{TEST_LEVEL},
+ $p->{ 'testlevel' },
+ 0
+ );
+
+ $self->log_verbose( "Test level is $level\n" );
+
+ require Test::Manifest;
+ my @files = Test::Manifest::get_t_files( $level );
+ \@files;
+ }
+ }
+ }
+
+=back
+
+=head2 Functions
+
+=over 4
+
+=item run_t_manifest( TEST_VERBOSE, INST_LIB, INST_ARCHLIB, TEST_LEVEL )
+
+For C<Makemaker> only. You don't have to mess with this at the user
+level.
+
+Run all of the files in F through CTest::Harness:runtests
+in the order they appear in the file. This is inserted automatically
+
+ eval "use Test::Manifest";
+
+=cut
+
+sub run_t_manifest {
+ require Test::Harness;
+ require File::Spec;
+
+ $Test::Harness::verbose = shift;
+
+ local @INC = @INC;
+ unshift @INC, map { File::Spec->rel2abs($_) } @_[0,1];
+
+ my( $level ) = $_[2] || 0;
+
+ print STDERR "Test::Manifest $VERSION\n"
+ if $Test::Harness::verbose;
+
+ print STDERR "Level is $level\n"
+ if $Test::Harness::verbose;
+
+ my @files = get_t_files( $level );
+ print STDERR "Test::Manifest::test_harness found [@files]\n"
+ if $Test::Harness::verbose;
+
+ Test::Harness::runtests( @files );
+ }
+
+=item get_t_files( [LEVEL] )
+
+In scalar context it returns a single string that you can use directly
+in C. In list context it returns a list of the files it
+found in F.
+
+If a F file does not exist, C returns
+nothing.
+
+C warns you if it can't find F, or if
+entries start with F<t/>. It skips blank lines, and strips Perl
+style comments from the file.
+
+Each line in F can have three parts: the test name,
+the test level (a floating point number), and a comment. By default,
+the test level is 1.
+
+ test_name.t 2 #Run this only for level 2 testing
+
+Without an argument, C returns all the test files it
+finds. With an argument that is true (so you can't use 0 as a level)
+and is a number, it skips tests with a level greater than that
+argument. You can then define sets of tests and choose a set to
+run. For instance, you might create a set for end users, but also
+add on a set for deeper testing for developers.
+
+Experimentally, you can include a command to grab test names from
+another file. The command starts with a C<;> to distinguish it
+from a true filename. The filename (currently) is relative to the
+current working directory, unlike the filenames, which are relative
+to C<t/>. The filenames in the included are still relative to C<t/>.
+
+ ;include t/file_with_other_test_names.txt
+
+Also experimentally, you can stop CTest::Manifest from reading
+filenames with the C<;skip> directive. CTest::Manifest will skip the
+filenames up to the C<;unskip> directive (or end of file):
+
+ run_this1
+ ;skip
+ skip_this
+ ;unskip
+ run_this2
+
+To select sets of tests, specify the level in the environment variable
+C:
+
+ make test # run all tests no matter the level
+ make test TEST_LEVEL=2 # run all tests level 2 and below
+
+Eventually this will end up as an option to F:
+
+ ./Build test --testlevel=2 # Not yet supported
+
+=cut
+
+sub get_t_files {
+ my $upper_bound = shift;
+ print STDERR "# Test level is $upper_bound\n"
+ if $Test::Harness::verbose;
+
+ %SeenInclude = ();
+ %SeenTest = ();
+
+ my $Manifest = manifest_name();
+ carp( "$Manifest does not exist!" ) unless -e $Manifest;
+ my $result = _load_test_manifest( $Manifest, $upper_bound );
+ return unless defined $result;
+ my @tests = @{$result};
+
+ return wantarray ? @tests : join " ", @tests;
+ }
+
+# Wrapper for loading test manifest files to support including other files
+sub _load_test_manifest {
+ my $manifest = shift;
+ return unless open my( $fh ), '<', $manifest;
+
+ my $upper_bound = shift || 0;
+ my @tests = ();
+
+ LINE: while( <$fh> ) {
+ s/#.*//; s/^\s+//; s/\s+$//;
+
+ next unless $_;
+
+ my( $command, $arg ) = split/\s+/, $_, 2;
+ if( ';' eq substr( $command, 0, 1 ) ) {
+ if( $command eq ';include' ) {
+ my $result = _include_file( $arg, $., $upper_bound );
+ push @tests, @$result if defined $result;
+ next;
+ }
+ elsif( $command eq ';skip' ) {
+ while( <$fh> ) { last if m/^;unskip/ }
+ next LINE;
+ }
+ else {
+ croak( "Unknown directive: $command" );
+ }
+ }
+
+ my( $test, $level ) = ( $command, $arg );
+ $level = 1 unless defined $level;
+
+ next if( $upper_bound and $level > $upper_bound );
+
+ carp( "Bad value for test [$test] level [$level]\n".
+ "Level should be a floating-point number\n" )
+ unless $level =~ m/^\d+(?:.\d+)?$/;
+ carp( "test file begins with t/ [$test]" ) if m|^t/|;
+
+ $test = catfile( "t", $test ) if -e catfile( "t", $test );
+
+ unless( -e $test ) {
+ carp( "test file [$test] does not exist! Skipping!" );
+ next;
+ }
+
+ # Make sure we don't include a test we've already seen
+ next if exists $SeenTest{$test};
+
+ $SeenTest{$test} = 1;
+ push @tests, $test;
+ }
+
+ close $fh;
+ return \@tests;
+ }
+
+sub _include_file {
+ my( $file, $line, $upper_bound ) = @_;
+ print STDERR "# Including file $file at line $line\n"
+ if $Test::Harness::verbose;
+
+ unless( -e $file ) {
+ carp( "$file does not exist" ) ;
+ return;
+ }
+
+ if( exists $SeenInclude{$file} ) {
+ carp( "$file already loaded - skipping" ) ;
+ return;
+ }
+
+ $SeenInclude{$file} = $line;
+
+ my $result = _load_test_manifest( $file, $upper_bound );
+ return unless defined $result;
+
+ $result;
+ }
+
+
+=item make_test_manifest()
+
+Creates the test_manifest file in the t directory by reading the
+contents of the F<t/> directory.
+
+TO DO: specify tests in argument lists.
+
+TO DO: specify files to skip.
+
+=cut
+
+sub make_test_manifest() {
+ carp( "t/ directory does not exist!" ) unless -d "t";
+ return unless open my( $fh ), '>', manifest_name();
+
+ my $count = 0;
+ while( my $file = glob("t/*.t") ) {
+ $file =~ s|^t/||;
+ print $fh "$file\n";
+ $count++;
+ }
+ close $fh;
+
+ return $count;
+ }
+
+=item manifest_name()
+
+Returns the name of the test manifest file, relative to F<t/>.
+
+=cut
+
+{
+my $Manifest = catfile( "t", "test_manifest" );
+
+sub manifest_name {
+ return $Manifest;
+ }
+}
+
+=back
+
+=head1 SOURCE AVAILABILITY
+
+This source is in Github:
+
+ http://github.com/briandfoy/test-manifest/
+
+=head1 CREDITS
+
+Matt Vanderpol suggested and supplied a patch for the C<;include>
+feature.
+
+=head1 AUTHOR
+
+brian d foy, C<< >>
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (c) 2002-2014 brian d foy. All rights reserved.
+
+This program is free software; you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+
+1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Manifest-1.23/t/01get_test_files.t new/Test-Manifest-2.02/t/01get_test_files.t
--- old/Test-Manifest-1.23/t/01get_test_files.t 2009-07-17 10:05:50.000000000 +0200
+++ new/Test-Manifest-2.02/t/01get_test_files.t 2014-08-26 19:02:00.000000000 +0200
@@ -36,13 +36,13 @@
if( $^O eq 'VMS' ) # http://perldoc.perl.org/perlvms.html#unlink-LIST
{
1 while ( unlink manifest_name() );
- }
-else
+ }
+else
{
unlink manifest_name();
}
--e manifest_name() ?
+-e manifest_name() ?
fail( "test_manifest still around after unlink!") :
pass( "test_manifest unlinked") ;
@@ -62,17 +62,17 @@
my @expected = ( [] );
$expected[1] = [ qw( 00load.t 01get_test_files.t pod_coverage.t) ];
-$expected[2] = [ qw( 00load.t 01get_test_files.t 01make_test_manifest.t
+$expected[2] = [ qw( 00load.t 01get_test_files.t 01make_test_manifest.t
pod_coverage.t ) ];
-$expected[3] = [ qw( 00load.t 01get_test_files.t 01make_test_manifest.t
+$expected[3] = [ qw( 00load.t 01get_test_files.t 01make_test_manifest.t
leading_space.t pod_coverage.t trailing_space.t ) ];
-$expected[0] = [ qw( 00load.t 01get_test_files.t 01make_test_manifest.t
+$expected[0] = [ qw( 00load.t 01get_test_files.t 01make_test_manifest.t
leading_space.t pod_coverage.t trailing_space.t 99pod.t ) ];
-
+
foreach my $level ( 0 .. 3 )
{
my $string = get_t_files( $level );
- my $expected = join ' ', map { File::Spec->catfile( 't', $_ ) }
+ my $expected = join ' ', map { File::Spec->catfile( 't', $_ ) }
@{ $expected[$level] };
is( $string, $expected, "Level $level version of tests is right" );
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Manifest-1.23/t/01make_test_manifest.t new/Test-Manifest-2.02/t/01make_test_manifest.t
--- old/Test-Manifest-1.23/t/01make_test_manifest.t 2009-07-17 10:05:50.000000000 +0200
+++ new/Test-Manifest-2.02/t/01make_test_manifest.t 2014-08-26 19:02:00.000000000 +0200
@@ -7,8 +7,8 @@
if($^O eq 'VMS') # http://perldoc.perl.org/perlvms.html#unlink-LIST
{
1 while ( unlink $test_manifest );
- }
-else
+ }
+else
{
unlink $test_manifest;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Manifest-1.23/t/include.t new/Test-Manifest-2.02/t/include.t
--- old/Test-Manifest-1.23/t/include.t 2009-07-17 10:05:50.000000000 +0200
+++ new/Test-Manifest-2.02/t/include.t 2014-08-26 19:02:00.000000000 +0200
@@ -7,20 +7,20 @@
use Test::Manifest qw(get_t_files manifest_name);
-ok( -e File::Spec->catfile( "t", "include_in_manifest.txt" ),
+ok( -e File::Spec->catfile( "t", "include_in_manifest.txt" ),
"Found file I'll include in test_manifest" );
-ok( -e 'test_manifest_with_include',
+ok( -e 'test_manifest_with_include',
"Found file that I'll copy to test_manifest" );
copy( 'test_manifest_with_include', manifest_name() );
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
my @expected_tests = map { File::Spec->catfile( "t", $_ ) } qw(
- 00load.t
+ 00load.t
99pod.t
01get_test_files.t
);
-
+
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
my $expected = join " ", @expected_tests;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Manifest-1.23/t/include_in_manifest.txt new/Test-Manifest-2.02/t/include_in_manifest.txt
--- old/Test-Manifest-1.23/t/include_in_manifest.txt 2009-07-17 10:05:50.000000000 +0200
+++ new/Test-Manifest-2.02/t/include_in_manifest.txt 2014-08-26 19:02:00.000000000 +0200
@@ -1,2 +1,2 @@
99pod.t
-01get_test_files.t
\ No newline at end of file
+01get_test_files.t
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Manifest-1.23/t/leading_space.t new/Test-Manifest-2.02/t/leading_space.t
--- old/Test-Manifest-1.23/t/leading_space.t 2009-07-17 10:05:50.000000000 +0200
+++ new/Test-Manifest-2.02/t/leading_space.t 2014-08-26 19:02:00.000000000 +0200
@@ -1,2 +1,2 @@
use Test::More tests => 1;
-pass( 'this file must exist for tests' );
\ No newline at end of file
+pass( 'this file must exist for tests' );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Manifest-1.23/t/pod_coverage.t new/Test-Manifest-2.02/t/pod_coverage.t
--- old/Test-Manifest-1.23/t/pod_coverage.t 2009-07-17 10:05:50.000000000 +0200
+++ new/Test-Manifest-2.02/t/pod_coverage.t 2014-08-26 19:02:00.000000000 +0200
@@ -9,5 +9,5 @@
{
plan tests => 1;
- pod_coverage_ok( "Test::Manifest" );
+ pod_coverage_ok( "Test::Manifest" );
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Manifest-1.23/t/test_manifest new/Test-Manifest-2.02/t/test_manifest
--- old/Test-Manifest-1.23/t/test_manifest 1970-01-01 01:00:00.000000000 +0100
+++ new/Test-Manifest-2.02/t/test_manifest 2014-08-26 19:02:00.000000000 +0200
@@ -0,0 +1,7 @@
+# this is a comment, then a blank line
+
+00load.t
+01get_test_files.t
+01make_test_manifest.t
+ leading_space.t
+trailing_space.t # comment at end of line
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Manifest-1.23/t/trailing_space.t new/Test-Manifest-2.02/t/trailing_space.t
--- old/Test-Manifest-1.23/t/trailing_space.t 2009-07-17 10:05:50.000000000 +0200
+++ new/Test-Manifest-2.02/t/trailing_space.t 2014-08-26 19:02:00.000000000 +0200
@@ -1,2 +1,2 @@
use Test::More tests => 1;
-pass( 'this file must exist for tests' );
\ No newline at end of file
+pass( 'this file must exist for tests' );