Hello community,
here is the log from the commit of package perl-Test-SharedFork for
openSUSE:Factory checked in at 2015-04-15 16:27:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Test-SharedFork (Old)
and /work/SRC/openSUSE:Factory/.perl-Test-SharedFork.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Test-SharedFork"
Changes:
--------
---
/work/SRC/openSUSE:Factory/perl-Test-SharedFork/perl-Test-SharedFork.changes
2014-03-18 14:16:57.000000000 +0100
+++
/work/SRC/openSUSE:Factory/.perl-Test-SharedFork.new/perl-Test-SharedFork.changes
2015-04-15 16:27:16.000000000 +0200
@@ -1,0 +2,35 @@
+Tue Apr 14 19:19:04 UTC 2015 - [email protected]
+
+- updated to 0.29
+ see /usr/share/doc/packages/perl-Test-SharedFork/Changes
+
+ 0.29 2014-09-20T04:21:14Z
+
+ 0.28 2014-07-04T07:37:50Z
+
+ - Fixed minor testing issue on Win32.
+ (charsbar++)
+
+ 0.27 2014-07-03T05:37:00Z
+
+ commit fa8821ff5fe7b44a2461ea58e537ea01221504ed
+ Author: Chad Granum <[email protected]>
+ Date: Tue Jul 1 15:13:28 2014 -0700
+
+ Fix another issue with Result_Stream branch of TB
+
+ 0.26 2014-06-27T04:20:47Z
+
+ - Fix support for Result_Stream Test::Builder branch
+ (exodist)
+
+ 0.25 2014-06-24T01:34:10Z
+
+ - Switch to EUMM
+
+ 0.24 2014-04-07T21:21:56Z
+
+ - Cygwin 64-bit - allow tests to pass
+ (rwhitworth)
+
+-------------------------------------------------------------------
Old:
----
Test-SharedFork-0.23.tar.gz
New:
----
Test-SharedFork-0.29.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Test-SharedFork.spec ++++++
--- /var/tmp/diff_new_pack.YU4NkW/_old 2015-04-15 16:27:16.000000000 +0200
+++ /var/tmp/diff_new_pack.YU4NkW/_new 2015-04-15 16:27:16.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package perl-Test-SharedFork
#
-# Copyright (c) 2014 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
@@ -17,22 +17,19 @@
Name: perl-Test-SharedFork
-Version: 0.23
+Version: 0.29
Release: 0
%define cpan_name Test-SharedFork
Summary: fork test
License: Artistic-1.0 or GPL-1.0+
Group: Development/Libraries/Perl
Url: http://search.cpan.org/dist/Test-SharedFork/
-Source:
http://www.cpan.org/authors/id/T/TO/TOKUHIROM/%{cpan_name}-%{version}.tar.gz
+Source:
http://www.cpan.org/authors/id/E/EX/EXODIST/%{cpan_name}-%{version}.tar.gz
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(App::Prove)
-BuildRequires: perl(CPAN::Meta)
-BuildRequires: perl(CPAN::Meta::Prereqs)
-BuildRequires: perl(Module::Build) >= 0.38
BuildRequires: perl(Test::More) >= 0.88
BuildRequires: perl(Test::Requires)
Requires: perl(Test::More) >= 0.88
@@ -49,18 +46,19 @@
%setup -q -n %{cpan_name}-%{version}
%build
-%{__perl} Build.PL installdirs=vendor
-./Build build flags=%{?_smp_mflags}
+%{__perl} Makefile.PL INSTALLDIRS=vendor
+%{__make} %{?_smp_mflags}
%check
-./Build test
+%{__make} test
%install
-./Build install destdir=%{buildroot} create_packlist=0
+%perl_make_install
+%perl_process_packlist
%perl_gen_filelist
%files -f %{name}.files
%defattr(-,root,root,755)
-%doc Changes cpanfile LICENSE README.md README.mkdn
+%doc Changes LICENSE minil.toml README.md README.mkdn
%changelog
++++++ Test-SharedFork-0.23.tar.gz -> Test-SharedFork-0.29.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-SharedFork-0.23/Build.PL
new/Test-SharedFork-0.29/Build.PL
--- old/Test-SharedFork-0.23/Build.PL 2014-03-12 21:12:19.000000000 +0100
+++ new/Test-SharedFork-0.29/Build.PL 1970-01-01 01:00:00.000000000 +0100
@@ -1,72 +0,0 @@
-# =========================================================================
-# THIS FILE IS AUTOMATICALLY GENERATED BY MINILLA.
-# DO NOT EDIT DIRECTLY.
-# =========================================================================
-
-use 5.008_001;
-
-use strict;
-use warnings;
-use utf8;
-
-use Module::Build;
-use File::Basename;
-use File::Spec;
-use CPAN::Meta;
-use CPAN::Meta::Prereqs;
-
-my %args = (
- license => 'perl',
- dynamic_config => 0,
-
- configure_requires => {
- 'Module::Build' => 0.38,
- },
-
- name => 'Test-SharedFork',
- module_name => 'Test::SharedFork',
- allow_pureperl => 0,
-
- script_files => [glob('script/*'), glob('bin/*')],
- c_source => [qw()],
- PL_files => {},
-
- test_files => ((-d '.git' || $ENV{RELEASE_TESTING}) && -d 'xt')
? 't/ xt/' : 't/',
- recursive_test_files => 1,
-
-
-);
-if (-d 'share') {
- $args{share_dir} = 'share';
-}
-
-my $builder = Module::Build->subclass(
- class => 'MyBuilder',
- code => q{
- sub ACTION_distmeta {
- die "Do not run distmeta. Install Minilla and `minil install`
instead.\n";
- }
- sub ACTION_installdeps {
- die "Do not run installdeps. Run `cpanm --installdeps .`
instead.\n";
- }
- }
-)->new(%args);
-$builder->create_build_script();
-
-my $mbmeta = CPAN::Meta->load_file('MYMETA.json');
-my $meta = CPAN::Meta->load_file('META.json');
-my $prereqs_hash = CPAN::Meta::Prereqs->new(
- $meta->prereqs
-)->with_merged_prereqs(
- CPAN::Meta::Prereqs->new($mbmeta->prereqs)
-)->as_string_hash;
-my $mymeta = CPAN::Meta->new(
- {
- %{$meta->as_struct},
- prereqs => $prereqs_hash
- }
-);
-print "Merging cpanfile prereqs to MYMETA.yml\n";
-$mymeta->save('MYMETA.yml', { version => 1.4 });
-print "Merging cpanfile prereqs to MYMETA.json\n";
-$mymeta->save('MYMETA.json', { version => 2 });
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-SharedFork-0.23/Changes
new/Test-SharedFork-0.29/Changes
--- old/Test-SharedFork-0.23/Changes 2014-03-12 21:12:19.000000000 +0100
+++ new/Test-SharedFork-0.29/Changes 2014-09-20 06:21:56.000000000 +0200
@@ -1,5 +1,34 @@
Revision history for Perl module Test::SharedFork
+0.29 2014-09-20T04:21:14Z
+
+0.28 2014-07-04T07:37:50Z
+
+ - Fixed minor testing issue on Win32.
+ (charsbar++)
+
+0.27 2014-07-03T05:37:00Z
+
+ commit fa8821ff5fe7b44a2461ea58e537ea01221504ed
+ Author: Chad Granum <[email protected]>
+ Date: Tue Jul 1 15:13:28 2014 -0700
+
+ Fix another issue with Result_Stream branch of TB
+
+0.26 2014-06-27T04:20:47Z
+
+ - Fix support for Result_Stream Test::Builder branch
+ (exodist)
+
+0.25 2014-06-24T01:34:10Z
+
+ - Switch to EUMM
+
+0.24 2014-04-07T21:21:56Z
+
+ - Cygwin 64-bit - allow tests to pass
+ (rwhitworth)
+
0.23 2014-03-12T20:12:11Z
- 06_fail_lineno.t fails on Windows due to path separator #9
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-SharedFork-0.23/MANIFEST
new/Test-SharedFork-0.29/MANIFEST
--- old/Test-SharedFork-0.23/MANIFEST 2014-03-12 21:12:19.000000000 +0100
+++ new/Test-SharedFork-0.29/MANIFEST 2014-09-20 06:21:56.000000000 +0200
@@ -1,7 +1,7 @@
-Build.PL
Changes
LICENSE
META.json
+Makefile.PL
README.md
README.mkdn
cpanfile
@@ -9,6 +9,7 @@
lib/Test/SharedFork/Array.pm
lib/Test/SharedFork/Scalar.pm
lib/Test/SharedFork/Store.pm
+minil.toml
t/00_compile.t
t/01_simple.t
t/02_fork_method.t
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-SharedFork-0.23/META.json
new/Test-SharedFork-0.29/META.json
--- old/Test-SharedFork-0.23/META.json 2014-03-12 21:12:19.000000000 +0100
+++ new/Test-SharedFork-0.29/META.json 2014-09-20 06:21:56.000000000 +0200
@@ -4,7 +4,7 @@
"Tokuhiro Matsuno <tokuhirom slkjfd gmail.com>"
],
"dynamic_config" : 0,
- "generated_by" : "Minilla/v0.11.1",
+ "generated_by" : "Minilla/v2.1.1",
"license" : [
"perl_5"
],
@@ -28,15 +28,14 @@
"prereqs" : {
"configure" : {
"requires" : {
- "CPAN::Meta" : "0",
- "CPAN::Meta::Prereqs" : "0",
- "Module::Build" : "0.38"
+ "ExtUtils::MakeMaker" : "6.64"
}
},
"develop" : {
"requires" : {
"Test::CPAN::Meta" : "0",
- "Test::MinimumVersion" : "0.10108",
+ "Test::MinimumVersion::Fast" : "0.04",
+ "Test::PAUSE::Permissions" : "0.04",
"Test::Pod" : "1.41",
"Test::Spellunker" : "v0.2.7"
}
@@ -62,7 +61,7 @@
"provides" : {
"Test::SharedFork" : {
"file" : "lib/Test/SharedFork.pm",
- "version" : "0.23"
+ "version" : "0.29"
},
"Test::SharedFork::Array" : {
"file" : "lib/Test/SharedFork/Array.pm"
@@ -85,14 +84,17 @@
"web" : "https://github.com/tokuhirom/Test-SharedFork"
}
},
- "version" : "0.23",
+ "version" : "0.29",
"x_contributors" : [
"lestrrat <[email protected]>",
- "Rob Hoelz <[email protected]>",
"Vyacheslav Matyukhin <[email protected]>",
"Michael G. Schwern <[email protected]>",
"Perlover <[email protected]>",
"Neil Bowers <[email protected]>",
- "Tokuhiro Matsuno <[email protected]>"
+ "Rob Hoelz <[email protected]>",
+ "rwhitworth <[email protected]>",
+ "Kenichi Ishigaki <[email protected]>",
+ "Tokuhiro Matsuno <[email protected]>",
+ "Chad Granum <[email protected]>"
]
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-SharedFork-0.23/META.yml
new/Test-SharedFork-0.29/META.yml
--- old/Test-SharedFork-0.23/META.yml 2014-03-12 21:12:19.000000000 +0100
+++ new/Test-SharedFork-0.29/META.yml 2014-09-20 06:21:56.000000000 +0200
@@ -3,20 +3,18 @@
author:
- 'Tokuhiro Matsuno <tokuhirom slkjfd gmail.com>'
build_requires:
- App::Prove: 0
- Test::Builder::Tester: 0
- Test::Requires: 0
- Time::HiRes: 0
+ App::Prove: '0'
+ Test::Builder::Tester: '0'
+ Test::Requires: '0'
+ Time::HiRes: '0'
configure_requires:
- CPAN::Meta: 0
- CPAN::Meta::Prereqs: 0
- Module::Build: 0.38
+ ExtUtils::MakeMaker: '6.64'
dynamic_config: 0
-generated_by: 'Minilla/v0.11.1, CPAN::Meta::Converter version 2.133380'
+generated_by: 'Minilla/v2.1.1, CPAN::Meta::Converter version 2.140640'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
- version: 1.4
+ version: '1.4'
name: Test-SharedFork
no_index:
directory:
@@ -31,7 +29,7 @@
provides:
Test::SharedFork:
file: lib/Test/SharedFork.pm
- version: 0.23
+ version: '0.29'
Test::SharedFork::Array:
file: lib/Test/SharedFork/Array.pm
Test::SharedFork::Scalar:
@@ -39,21 +37,24 @@
Test::SharedFork::Store:
file: lib/Test/SharedFork/Store.pm
requires:
- File::Temp: 0
- Test::Builder: 0.32
- Test::Builder::Module: 0
- Test::More: 0.88
+ File::Temp: '0'
+ Test::Builder: '0.32'
+ Test::Builder::Module: '0'
+ Test::More: '0.88'
perl: 5.008_001
resources:
bugtracker: https://github.com/tokuhirom/Test-SharedFork/issues
homepage: https://github.com/tokuhirom/Test-SharedFork
repository: git://github.com/tokuhirom/Test-SharedFork.git
-version: 0.23
+version: '0.29'
x_contributors:
- 'lestrrat <[email protected]>'
- - 'Rob Hoelz <[email protected]>'
- 'Vyacheslav Matyukhin <[email protected]>'
- 'Michael G. Schwern <[email protected]>'
- 'Perlover <[email protected]>'
- 'Neil Bowers <[email protected]>'
+ - 'Rob Hoelz <[email protected]>'
+ - 'rwhitworth <[email protected]>'
+ - 'Kenichi Ishigaki <[email protected]>'
- 'Tokuhiro Matsuno <[email protected]>'
+ - 'Chad Granum <[email protected]>'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-SharedFork-0.23/Makefile.PL
new/Test-SharedFork-0.29/Makefile.PL
--- old/Test-SharedFork-0.23/Makefile.PL 1970-01-01 01:00:00.000000000
+0100
+++ new/Test-SharedFork-0.29/Makefile.PL 2014-09-20 06:21:56.000000000
+0200
@@ -0,0 +1,45 @@
+# =========================================================================
+# THIS FILE IS AUTOMATICALLY GENERATED BY MINILLA.
+# DO NOT EDIT DIRECTLY.
+# =========================================================================
+
+use 5.008_001;
+use strict;
+
+use ExtUtils::MakeMaker;
+
+
+use File::Copy;
+
+print "cp META.json MYMETA.json\n";
+copy("META.json","MYMETA.json") or die "Copy failed(META.json): $!";
+
+if (-f 'META.yml') {
+ print "cp META.yml MYMETA.yml\n";
+ copy("META.yml","MYMETA.yml") or die "Copy failed(META.yml): $!";
+} else {
+ print "There is no META.yml... You may install this module from the
repository...\n";
+}
+
+my %args;
+if ($ExtUtils::MakeMaker::VERSION >= 6.64) {
+ # *_REQUIRES was supported.
+
+ $args{CONFIGURE_REQUIRES} = {"ExtUtils::MakeMaker" => "6.64"};
+ $args{BUILD_REQUIRES} = {};
+ $args{TEST_REQUIRES} = {"App::Prove" => 0,"Test::Builder::Tester" =>
0,"Test::Requires" => 0,"Time::HiRes" => 0};
+ $args{PREREQ_PM} = {"File::Temp" => 0,"Test::Builder" =>
"0.32","Test::Builder::Module" => 0,"Test::More" => "0.88","perl" =>
"5.008_001"};
+} else {
+ $args{PREREQ_PM} = {"App::Prove" => 0,"ExtUtils::MakeMaker" =>
"6.64","File::Temp" => 0,"Test::Builder" => "0.32","Test::Builder::Module" =>
0,"Test::Builder::Tester" => 0,"Test::More" => "0.88","Test::Requires" =>
0,"Time::HiRes" => 0,"perl" => "5.008_001"};
+}
+
+if ($ExtUtils::MakeMaker::VERSION >= 6.57_01) {
+ $args{NO_MYMETA} = 1;
+}
+
+WriteMakefile(
+ NAME => 'Test::SharedFork',
+ DISTNAME => 'Test-SharedFork',
+ VERSION => '0.29',
+ %args,
+);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-SharedFork-0.23/lib/Test/SharedFork.pm
new/Test-SharedFork-0.29/lib/Test/SharedFork.pm
--- old/Test-SharedFork-0.23/lib/Test/SharedFork.pm 2014-03-12
21:12:19.000000000 +0100
+++ new/Test-SharedFork-0.29/lib/Test/SharedFork.pm 2014-09-20
06:21:56.000000000 +0200
@@ -2,7 +2,7 @@
use strict;
use warnings;
use base 'Test::Builder::Module';
-our $VERSION = '0.23';
+our $VERSION = '0.29';
use Test::Builder 0.32; # 0.32 or later is needed
use Test::SharedFork::Scalar;
use Test::SharedFork::Array;
@@ -53,31 +53,84 @@
if ($builder->can("coordinate_forks")) {
# Use Test::Builder's implementation.
$builder->new->coordinate_forks(1);
+ } elsif (Test::Stream->can('use_fork')) {
+ my $stream = $builder->{stream} || Test::Stream->shared;
+ $stream->use_fork;
} else {
- # older Test::Builder
- $STORE = Test::SharedFork::Store->new(
- cb => sub {
- my $store = shift;
- tie $builder->{Curr_Test}, 'Test::SharedFork::Scalar',
- $store, 'Curr_Test';
- tie $builder->{Is_Passing}, 'Test::SharedFork::Scalar',
- $store, 'Is_Passing';
- tie @{ $builder->{Test_Results} },
- 'Test::SharedFork::Array', $store, 'Test_Results';
- },
- init => +{
- Test_Results => $builder->{Test_Results},
- Curr_Test => $builder->{Curr_Test},
- },
- );
+ if ($builder->can('trace_test')) {
+ my $stream = $builder->stream;
+ my $tap = $stream->tap;
+ my $lresults = $stream->lresults;
+ $STORE = Test::SharedFork::Store->new(
+ cb => sub {
+ my $store = shift;
+
+ tie $stream->{tests_run}, 'Test::SharedFork::Scalar',
+ $store, 'tests_run';
+ tie $stream->{tests_failed}, 'Test::SharedFork::Scalar',
+ $store, 'tests_failed';
+ tie $stream->{is_passing}, 'Test::SharedFork::Scalar',
+ $store, 'is_passing';
+
+ if ($tap) {
+ tie $tap->{number}, 'Test::SharedFork::Scalar',
+ $store, 'number';
+ tie $tap->{ok_lock}, 'Test::SharedFork::Scalar',
+ $store, 'ok_lock';
+ }
+
+ if ($lresults) {
+ tie $lresults->{Curr_Test}, 'Test::SharedFork::Scalar',
+ $store, 'Curr_Test';
+ tie @{ $lresults->{Test_Results} },
+ 'Test::SharedFork::Array', $store, 'Test_Results';
+ }
+ },
+ init => +{
+ tests_run => $stream->{tests_run},
+ tests_failed => $stream->{tests_failed},
+ is_passing => 1,
+
+ $tap ? (
+ number => $tap->{number},
+ ok_lock => $tap->{ok_lock},
+ ) : (),
+
+ $lresults ? (
+ Test_Results => $builder->{Test_Results} || [],
+ Curr_Test => $builder->{Curr_Test} || 0,
+ ) : (),
+ },
+ );
+ } else {
+ # older Test::Builder
+ $STORE = Test::SharedFork::Store->new(
+ cb => sub {
+ my $store = shift;
+ tie $builder->{Curr_Test}, 'Test::SharedFork::Scalar',
+ $store, 'Curr_Test';
+ tie $builder->{Is_Passing}, 'Test::SharedFork::Scalar',
+ $store, 'Is_Passing';
+ tie @{ $builder->{Test_Results} },
+ 'Test::SharedFork::Array', $store, 'Test_Results';
+ },
+ init => +{
+ Test_Results => $builder->{Test_Results},
+ Curr_Test => $builder->{Curr_Test},
+ Is_Passing => 1,
+ },
+ );
+ }
# make methods atomic.
no strict 'refs';
no warnings 'redefine';
+ no warnings 'uninitialized';
for my $name (qw/ok skip todo_skip current_test is_passing/) {
my $orig = *{"Test::Builder::${name}"}{CODE};
*{"Test::Builder::${name}"} = sub {
local $Test::Builder::Level = $Test::Builder::Level + 1;
+ local $Test::Builder::BLevel = $Test::Builder::BLevel + 1;
my $lock = $STORE->get_lock(); # RAII
$orig->(@_);
};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-SharedFork-0.23/minil.toml
new/Test-SharedFork-0.29/minil.toml
--- old/Test-SharedFork-0.23/minil.toml 1970-01-01 01:00:00.000000000 +0100
+++ new/Test-SharedFork-0.29/minil.toml 2014-09-20 06:21:56.000000000 +0200
@@ -0,0 +1 @@
+module_maker="ExtUtilsMakeMaker"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-SharedFork-0.23/t/01_simple.t
new/Test-SharedFork-0.29/t/01_simple.t
--- old/Test-SharedFork-0.23/t/01_simple.t 2014-03-12 21:12:19.000000000
+0100
+++ new/Test-SharedFork-0.29/t/01_simple.t 2014-09-20 06:21:56.000000000
+0200
@@ -13,7 +13,7 @@
for (1..20) {
$i++;
ok 1, "child $_";
- sleep(rand()/100);
+ sleep(1);
}
is $i, 20, 'child finished';
@@ -27,7 +27,7 @@
for (1..20) {
$i++;
ok 1, "parent $_";
- sleep(rand()/100);
+ sleep(1);
}
is $i, 20, 'parent finished';
waitpid($pid, 0);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-SharedFork-0.23/t/02_fork_method.t
new/Test-SharedFork-0.29/t/02_fork_method.t
--- old/Test-SharedFork-0.23/t/02_fork_method.t 2014-03-12 21:12:19.000000000
+0100
+++ new/Test-SharedFork-0.29/t/02_fork_method.t 2014-09-20 06:21:56.000000000
+0200
@@ -9,7 +9,8 @@
my $i = 0;
for (1..20) {
$i++;
- ok 1, "child $_"
+ ok 1, "child $_";
+ sleep(1);
}
is $i, 20, 'child finished';
@@ -20,6 +21,7 @@
for (1..20) {
$i++;
ok 1, "parent $_";
+ sleep(1);
}
is $i, 20, 'parent finished';
waitpid($pid, 0);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-SharedFork-0.23/t/06_fail_lineno.t
new/Test-SharedFork-0.29/t/06_fail_lineno.t
--- old/Test-SharedFork-0.23/t/06_fail_lineno.t 2014-03-12 21:12:19.000000000
+0100
+++ new/Test-SharedFork-0.29/t/06_fail_lineno.t 2014-09-20 06:21:56.000000000
+0200
@@ -19,6 +19,5 @@
unlike($out, qr{lib/Test/SharedFork});
{
- my $path = catfile(qw(t 06_fail_lineno.t));
- like($out, qr{\Q$path\E line \d+\.});
+ like($out, qr{t[\\/]06_fail_lineno\.t line \d+\.});
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-SharedFork-0.23/t/12_is_passing.t
new/Test-SharedFork-0.29/t/12_is_passing.t
--- old/Test-SharedFork-0.23/t/12_is_passing.t 2014-03-12 21:12:19.000000000
+0100
+++ new/Test-SharedFork-0.29/t/12_is_passing.t 2014-09-20 06:21:56.000000000
+0200
@@ -4,6 +4,22 @@
use Test::More;
use Test::SharedFork;
+sub do_in_fork {
+ my ( $action ) = @_;
+
+ my $pid = fork();
+
+ die $! if !defined $pid;
+
+ if($pid) {
+ waitpid($pid, 0) or die $!;
+ } else {
+ # child
+ $action->();
+ exit 0;
+ }
+}
+
open my $fh, ">", \my $out or die $!;
my $builder = Test::Builder->create;
$builder->output($fh);
@@ -11,17 +27,27 @@
$builder->todo_output($fh);
Test::SharedFork::_mangle_builder($builder);
-my $pid = fork();
-die $! if !defined $pid;
-if ($pid) {
- # parent
- waitpid($pid, 0) or die $!;
- is $builder->is_passing, 0;
-} else {
- # child
- $builder->is_passing(0);
- exit 0;
-}
+
+ok $builder->is_passing, 'Test::Builder->is_passing starts truthy';
+
+do_in_fork(sub {
+ $builder->ok(1);
+});
+
+ok $builder->is_passing, 'Test::Builder->is_passing should still be truthy
after a passing test';
+
+do_in_fork(sub {
+ $builder->ok(0);
+});
+
+ok !$builder->is_passing, 'Test::Builder->is_passing should be falsy after a
failing test';
+
+do_in_fork(sub {
+ $builder->ok(1);
+});
+
+ok !$builder->is_passing, 'Test::Builder->is_passing should still be falsy,
even after a passing test post-fail';
+
diag $out;
done_testing;