This is an automated email from the git hooks/post-receive script. myon pushed a commit to branch master in repository libtap-parser-sourcehandler-pgtap-perl.
commit a52fa0bdb32797fb5fb62ecc36850df801f79a6a Author: Christoph Berg <m...@debian.org> Date: Tue Dec 22 23:21:46 2015 +0100 Imported Upstream version 3.31 --- Build.PL | 2 +- Changes | 14 +++++++++ MANIFEST | 3 +- META.json | 8 ++--- META.yml | 24 +++++++-------- README | 4 +-- bin/pg_prove | 57 +++++++++++++++++++++++------------ bin/pg_tapgen | 4 +-- lib/TAP/Parser/SourceHandler/pgTAP.pm | 12 +++++--- t/pod-coverage.t | 10 ------ t/pod.t | 7 ----- t/scripts/psql | 6 ++++ t/source_handler.t | 11 +++++-- 13 files changed, 95 insertions(+), 67 deletions(-) diff --git a/Build.PL b/Build.PL index 3d0a0f1..30bbd60 100644 --- a/Build.PL +++ b/Build.PL @@ -48,7 +48,7 @@ $class->new( resources => { homepage => 'http://search.cpan.org/dist/Tap-Parser-Sourcehandler-pgTAP/', bugtracker => 'http://github.com/theory/tap-parser-sourcehandler-pgtap/issues/', - repository => 'http://github.com/theory/tap-parser-sourcehandler-pgtap/tree/', + repository => 'http://github.com/theory/tap-parser-sourcehandler-pgtap', } }, )->create_build_script; diff --git a/Changes b/Changes index b53a5f9..06ac3c3 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,19 @@ Revision history for Perl extension TAP::Parser::SourceHandler::pgTAP. +3.31 2015-06-19T23:41:19Z + - The `--ext` option to `pg_prove` now always identifies pgTAP tests. Use + `prove` with the `--pgtap-option suffix=.foo` option to mix pgTAP tests + with other tests. + +3.30 2014-01-31T21:10:54Z + - Removed markup from preformatted text in the `pg_prove` documentation. + - Updated copyright dates. + - Added note to the docs mentioning that `pg_prove`-specific options are + not supported in `.proverc`, unfortunately. + - Removed `ON_ERROR_ROLLBACK=1`, as it does not work well with scripts, + anyway. + - Removed the Pod tests from the distribution. + 3.29 2013-01-09T00:15:34Z - Restored the `-t` alias for the the `--timer` option, thanks to Norman Yamada. diff --git a/MANIFEST b/MANIFEST index e446dac..d1a5cd3 100644 --- a/MANIFEST +++ b/MANIFEST @@ -8,7 +8,6 @@ META.json META.yml README t/bin/psql -t/pod-coverage.t -t/pod.t +t/scripts/psql t/source.pg t/source_handler.t diff --git a/META.json b/META.json index a5d4224..bc755d9 100644 --- a/META.json +++ b/META.json @@ -4,7 +4,7 @@ "David E. Wheeler <dwhee...@cpan.org>" ], "dynamic_config" : 1, - "generated_by" : "Module::Build version 0.4003, CPAN::Meta::Converter version 2.120921", + "generated_by" : "Module::Build version 0.4212", "license" : [ "perl_5" ], @@ -39,7 +39,7 @@ "provides" : { "TAP::Parser::SourceHandler::pgTAP" : { "file" : "lib/TAP/Parser/SourceHandler/pgTAP.pm", - "version" : "3.29" + "version" : "3.31" } }, "release_status" : "stable", @@ -52,8 +52,8 @@ "http://dev.perl.org/licenses/" ], "repository" : { - "url" : "http://github.com/theory/tap-parser-sourcehandler-pgtap/tree/" + "url" : "http://github.com/theory/tap-parser-sourcehandler-pgtap" } }, - "version" : "3.29" + "version" : "3.31" } diff --git a/META.yml b/META.yml index 09a9537..4eebd2b 100644 --- a/META.yml +++ b/META.yml @@ -3,30 +3,30 @@ abstract: 'Stream TAP from pgTAP test scripts' author: - 'David E. Wheeler <dwhee...@cpan.org>' build_requires: - Module::Build: 0.30 - Test::More: 0.88 + Module::Build: '0.30' + Test::More: '0.88' configure_requires: - Module::Build: 0.30 + Module::Build: '0.30' dynamic_config: 1 -generated_by: 'Module::Build version 0.4003, CPAN::Meta::Converter version 2.120921' +generated_by: 'Module::Build version 0.4212, CPAN::Meta::Converter version 2.150001' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html - version: 1.4 + version: '1.4' name: TAP-Parser-SourceHandler-pgTAP provides: TAP::Parser::SourceHandler::pgTAP: file: lib/TAP/Parser/SourceHandler/pgTAP.pm - version: 3.29 + version: '3.31' recommends: - Test::Pod: 1.41 - Test::Pod::Coverage: 1.06 + Test::Pod: '1.41' + Test::Pod::Coverage: '1.06' requires: - TAP::Parser::SourceHandler: 0 - perl: 5.006 + TAP::Parser::SourceHandler: '0' + perl: '5.006' resources: bugtracker: http://github.com/theory/tap-parser-sourcehandler-pgtap/issues/ homepage: http://search.cpan.org/dist/Tap-Parser-Sourcehandler-pgTAP/ license: http://dev.perl.org/licenses/ - repository: http://github.com/theory/tap-parser-sourcehandler-pgtap/tree/ -version: 3.29 + repository: http://github.com/theory/tap-parser-sourcehandler-pgtap +version: '3.31' diff --git a/README b/README index 50ae96f..47d6e10 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -TAP/Parser/SourceHandler/pgTAP version 3.29 +TAP/Parser/SourceHandler/pgTAP version 3.31 =========================================== This module adds support for executing [pgTAP](http://pgtap.org/) PostgreSQL @@ -54,7 +54,7 @@ TAP::Parser::SourceHandler::pgTAP requires TAP::Parser::SourceHandler. Copyright and Licence --------------------- -Copyright (c) 2010-2012 David E. Wheeler. Some Rights Reserved. +Copyright (c) 2010-2015 David E. Wheeler. Some Rights Reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. diff --git a/bin/pg_prove b/bin/pg_prove index e22c334..455da98 100755 --- a/bin/pg_prove +++ b/bin/pg_prove @@ -4,7 +4,7 @@ use strict; use App::Prove; use Getopt::Long; -our $VERSION = '3.29'; +our $VERSION = '3.31'; $|++; Getopt::Long::Configure(qw(no_ignore_case bundling pass_through)); @@ -71,6 +71,7 @@ my $app = $prove_class->new; $app->process_args( @ARGV, (map { ('--ext' => $_) } @{ $opts->{ext} || ['.pg'] }), + (map { ('--pgtap-option' => "suffix=$_") } @{ $opts->{ext} || [] }), qw(--source pgTAP), ($opts->{comments} ? ('--comments') : ()), ($opts->{timer} ? ('--timer') : ()), @@ -128,7 +129,7 @@ xUnit-style database functions. =head2 Test Scripts pgTAP test scripts should consist of a series of SQL statements that output -TAP. Here’s a simple example that assumes that the pgTAP functions have been +TAP. Here's a simple example that assumes that the pgTAP functions have been installed in the database: -- Start transaction and plan the tests. @@ -143,7 +144,7 @@ installed in the database: ROLLBACK; Now run the tests by passing the list of SQL script names or the name of a -test directory to C<pg_prove>. Here’s what it looks like when the pgTAP tests +test directory to C<pg_prove>. Here's what it looks like when the pgTAP tests are run with C<pg_prove> % pg_prove -U postgres tests/ @@ -183,33 +184,33 @@ C<pg_prove> by using the C<--runtests> option. Result: PASS Be sure to pass the C<--schema> option if your test functions are all in one -schema, and the C<--match> option if they have names that don’t start with -“test”. For example, if you have all of your test functions in the “test” -schema and I<ending> with “test,” run the tests like so: +schema, and the C<--match> option if they have names that don't start with +"test". For example, if you have all of your test functions in the "test" +schema and I<ending> with "test," run the tests like so: pg_prove --dbname mydb --schema test --match 'test$' =head1 Options - -b --psql-bin PSQL Location of the C<psql> client. + -b --psql-bin PSQL Location of the psql client. -d, --dbname DBNAME Database to which to connect. -U, --username USERNAME User with which to connect. -h, --host HOST Host to which to connect. -p, --port PORT Port to which to connect. -P, --pset OPTION=VALUE Set psql key/value printing option. -S, --set VAR=VALUE Set variables for psql session. - -R --runtests Run xUnit test using C<runtests()>. + -R --runtests Run xUnit test using runtests(). -s, --schema SCHEMA Schema in which to find xUnit tests. -x, --match REGEX Regular expression to find xUnit tests. - --ext Set the extension for tests (default F<.pg>) + --ext Set the extension for tests (default .pg) -r, --recurse Recursively descend into directories. --ignore-exit Ignore exit status from test scripts. - --trap Trap C<Ctrl-C> and print summary on interrupt. + --trap Trap Ctrl-C and print summary on interrupt. --harness Define test harness to use. -j, --jobs N Run N test jobs in parallel (try 9.) --rc RCFILE Process options from rcfile - --norc Don't process default F<.proverc> + --norc Don't process default .proverc --state OPTION=VALUE Set persistent state options. -v, --verbose Print all test lines. @@ -221,7 +222,7 @@ schema and I<ending> with “test,” run the tests like so: --parse Show full list of TAP parse errors, if any. --normalize Normalize TAP output in verbose output -D --dry Dry run. Show test that would have run. - --merge Merge test scripts' C<STDERR> and C<STDOUT>. + --merge Merge test scripts' STDERR and STDOUT. -t --timer Print elapsed time after each test. -c, --color Colored test output (default). --nocolor Do not color test output. @@ -325,7 +326,7 @@ on the supported options. pg_prove --runtests pg_prove -r -Don’t run any test scripts, but just use the C<runtests()> pgTAP function to +Don't run any test scripts, but just use the C<runtests()> pgTAP function to run xUnit tests. This ends up looking like a single test script has been run, when in fact no test scripts have been run. Instead, C<pg_prove> tells C<psql> to run something like: @@ -333,7 +334,7 @@ to run something like: psql --command 'SELECT * FROM runtests()' You should use this option when you've written your tests in xUnit style, -where they’re all defined in test functions already loaded in the database. +where they're all defined in test functions already loaded in the database. =item C<-s> @@ -362,7 +363,7 @@ run something like: psql --command "SELECT * FROM runtests('_test_'::text)" -This will run any visible functions with the string “_test_” in their names. +This will run any visible functions with the string "_test_" in their names. This can be especially useful if you just want to run a single test in a given schema. For example, this: @@ -383,10 +384,20 @@ Will have C<psql> execute the C<runtests()> function like so: pg_prove --ext .sql tests/ Set the extension for test files (default F<.pg>). May be specified multiple -times if you have test scripts with multiple extensions: +times if you have test scripts with multiple extensions, though all must be +pgTAP tests: pg_prove --ext .sql --ext .pg --ext .pgt +If you want to mix pgTAP tests with other TAP-emitting tests, like Perl tests, +use C<prove> instead, where C<--ext> identifies any test file, and +C<--pgtap-option suffix=> lets you specify one or more extensions for pgTAP +tests. + + prove --source Perl \ + --ext .t --ext .pg \ + --source pgTAP --pgtap-option suffix=.pg + =item C<-r> =item C<--recurse> @@ -394,8 +405,9 @@ times if you have test scripts with multiple extensions: pg_prove --recurse tests/ pg_prove --recurse sql/ -Recursively descend into directories when searching for tests. Not relevant -with C<--runtests>. +Recursively descend into directories when searching for tests. Be sure to +specify C<--ext> if your tests do not end in C<.pg>. Not relevant with +C<--runtests>. =item C<--ignore-exit> @@ -433,7 +445,7 @@ Run N test jobs in parallel (try 9.) Process options from the specified configuration file. If C<--rc> is not specified and F<./.proverc> or F<~/.proverc> exist, they -will be read and any options they contain processed before the command line +will be read and the options they contain processed before the command line options. Options in configuration files are specified in the same way as command line options: @@ -444,6 +456,11 @@ command line options: Under Windows and VMS the option file is named F<_proverc> rather than F<.proverc> and is sought only in the current directory. +Due to how options are loaded you cannot use F<.proverc> for +C<pg_prove>-specific options, only C<prove> options. However, <pg_prove> does +support all of the usual libpq +L<Environment Variables|http://www.postgresql.org/docs/current/static/libpq-envars.html>. + =item C<--norc> Do not process F<./.proverc> or F<~/.proverc>. @@ -756,6 +773,6 @@ David E. Wheeler <dwhee...@cpan.org> =head1 Copyright -Copyright (c) 2008-2012 David E. Wheeler. Some Rights Reserved. +Copyright (c) 2008-2015 David E. Wheeler. Some Rights Reserved. =cut diff --git a/bin/pg_tapgen b/bin/pg_tapgen index 2a038f5..e6e0f6f 100755 --- a/bin/pg_tapgen +++ b/bin/pg_tapgen @@ -6,7 +6,7 @@ use DBI; use DBD::Pg; use Getopt::Long; use File::Spec; -our $VERSION = '3.29'; +our $VERSION = '3.31'; Getopt::Long::Configure (qw(bundling)); @@ -396,6 +396,6 @@ David E. Wheeler <dwhee...@cpan.org> =head1 Copyright -Copyright (c) 2009-2012 David E. Wheeler. Some Rights Reserved. +Copyright (c) 2009-2015 David E. Wheeler. Some Rights Reserved. =cut diff --git a/lib/TAP/Parser/SourceHandler/pgTAP.pm b/lib/TAP/Parser/SourceHandler/pgTAP.pm index a28005f..1264969 100644 --- a/lib/TAP/Parser/SourceHandler/pgTAP.pm +++ b/lib/TAP/Parser/SourceHandler/pgTAP.pm @@ -9,7 +9,7 @@ use TAP::Parser::Iterator::Process (); @ISA = qw(TAP::Parser::SourceHandler); TAP::Parser::IteratorFactory->register_handler(__PACKAGE__); -our $VERSION = '3.29'; +our $VERSION = '3.31'; =head1 Name @@ -191,7 +191,7 @@ a score for how likely it is in fact a pgTAP test file. The scores are as follows: 1 if it's not a file and starts with "pgsql:". - 1 if it has a suffix equal to that in the "suffix" config + 1 if it has a suffix equal to that in a "suffix" config 1 if its suffix is ".pg" 0.8 if its suffix is ".sql" 0.75 if its suffix is ".s" @@ -215,7 +215,10 @@ sub can_handle { # If the config specifies a suffix, it's required. if ( my $config = $source->config_for('pgTAP') ) { - if ( defined $config->{suffix} ) { + if ( my $suffix = $config->{suffix} ) { + if (ref $suffix) { + return (grep { $suf eq $_ } @{ $suffix }) ? 1 : 0; + } return $suf eq $config->{suffix} ? 1 : 0; } } @@ -308,7 +311,6 @@ sub make_iterator { --quiet --pset pager= --pset tuples_only=true - --set ON_ERROR_ROLLBACK=1 --set ON_ERROR_STOP=1 ); @@ -394,7 +396,7 @@ David E. Wheeler <dwhee...@cpan.org> =head1 Copyright and License -Copyright (c) 2010-2012 David E. Wheeler. Some Rights Reserved. +Copyright (c) 2010-2015 David E. Wheeler. Some Rights Reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. diff --git a/t/pod-coverage.t b/t/pod-coverage.t deleted file mode 100644 index f673cf5..0000000 --- a/t/pod-coverage.t +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env perl -w - -use strict; -use warnings; -use Test::More; - -eval "use Test::Pod::Coverage 1.06"; -plan skip_all => 'Test::Pod::Coverage 1.06 required' if $@; - -all_pod_coverage_ok(); diff --git a/t/pod.t b/t/pod.t deleted file mode 100644 index 08172a1..0000000 --- a/t/pod.t +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env perl -w - -use strict; -use Test::More; -eval "use Test::Pod 1.41"; -plan skip_all => "Test::Pod 1.41 required for testing POD" if $@; -all_pod_files_ok(qw(lib bin)); diff --git a/t/scripts/psql b/t/scripts/psql new file mode 100755 index 0000000..cd554c2 --- /dev/null +++ b/t/scripts/psql @@ -0,0 +1,6 @@ +#!/Users/david/perl5/perlbrew/perls/perl-5.22.0/bin/perl + +eval 'exec /Users/david/perl5/perlbrew/perls/perl-5.22.0/bin/perl -S $0 ${1+"$@"}' + if 0; # not running under some shell + +print $_, $/ for @ARGV; diff --git a/t/source_handler.t b/t/source_handler.t index 6e8277c..a1a0dc5 100644 --- a/t/source_handler.t +++ b/t/source_handler.t @@ -2,7 +2,7 @@ use strict; -use Test::More tests => 50; +use Test::More tests => 47; use IO::File; use IO::Handle; @@ -27,7 +27,6 @@ $dir = catdir curdir, 't', 'bin' unless -d $dir; --quiet --pset pager= --pset tuples_only=true - --set ON_ERROR_ROLLBACK=1 --set ON_ERROR_STOP=1 ); my $tests = { @@ -65,6 +64,14 @@ $dir = catdir curdir, 't', 'bin' unless -d $dir; config => { pgTAP => { suffix => '.foo' } }, vote => 1, }, + { name => 'config_suffixes', + meta => { + is_file => 1, + file => { lc_ext => '.foo' } + }, + config => { pgTAP => { suffix => [qw(.foo .bar)] } }, + vote => 1, + }, { name => 'not_file', meta => { is_file => 0, -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libtap-parser-sourcehandler-pgtap-perl.git _______________________________________________ Pkg-perl-cvs-commits mailing list Pkg-perl-cvs-commits@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits