Subject: | Exit value of test scripts is suppressed, breaking CI tooling |
When Test::PostgreSQL is used, it masks the system return value.
Minimal test case
=================
$ perl -MTest::PostgreSQL -e 'my $tp = Test::PostgreSQL->new; exit 10' && echo 'OOPS'
OOPS
Effect
======
As Travis <travis-ci.org/> expects tests to return an exit code on failure, this breaks
scripts that use Test::PostgreSQL (e.g. Test::More, App::prove et al), as they no longer
return a failure value (e.g. Travis will report the build as successful anyway.)
Possible cause
==============
This appears to be because of overriding DESTROY and failing to localize $?
Hope that's useful, happy to provide any additional details.