Skip to content

Commit 2ddf5e8

Browse files
committed
add dep test error logging
1 parent 6a23a16 commit 2ddf5e8

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

xt/dependent-modules.t

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,16 @@ use Test::DependentModules 'test_all_dependents';
55

66
skip_all "ENV var TEST_DEPENDENTS not set" if not $ENV{TEST_DEPENDENTS};
77

8+
# duplicate error output into an array for later printing
9+
my @error_log;
10+
my $old = \&Test::DependentModules::_error_log;
11+
my $new = sub { push @error_log, @_; $old->(@_); };
12+
{ no warnings 'redefine'; *Test::DependentModules::_error_log = $new; }
13+
814
test_all_dependents #
915
PPI => { exclude => qr/^(Apache2-SSI|Devel-IPerl|Padre)$/ };
16+
17+
diag "\n\n---------- ERROR LOG START -----------\n\n",
18+
@error_log,
19+
"\n\n---------- ERROR LOG END -----------\n\n";
20+
done_testing;

0 commit comments

Comments
 (0)