Subject: | multiple test failures with perl-5.27.11 on FreeBSD-11.1 |
Today I attempted to install App-TimeTracker against perl-5.27.11 on a FreeBSD-11.1 VM sitting on a FreeBSD-11 host. I encountered test failures similar to those we have seen in the past year in Dist::Zilla (https://github.com/rjbs/Dist-Zilla/issues/586) and XML::Atom::Simple::Feed (https://github.com/ap/XML-Atom-SimpleFeed/issues/3). These failures manifest as an exception, "Cannot determine local time zone", thought to be thrown by DateTime::TimeZone::Local. The failures occur in environments such as virtual machines and chroot-ed directory trees.
Here is the output I got from the cpanm build.log:
#####
Building App-TimeTracker
t/00-load.t ...................... ok
Cannot determine local time zone
t/Command/core.t .................
Dubious, test returned 2 (wstat 512, 0x200)
No subtests run
# Test initial bug report
Cannot determine local time zone
t/Command/rt_73859_daychange.t ...
Dubious, test returned 2 (wstat 512, 0x200)
No subtests run
t/Proto/config.t ................. ok
t/Proto/run.t .................... ok
t/Task/current.t ................. ok
t/Task/helpers.t ................. ok
Cannot determine local time zone
t/Task/start.t ...................
Dubious, test returned 2 (wstat 512, 0x200)
No subtests run
t/Task/storage_location.t ........ ok
Cannot determine local time zone
t/TimeTracker/datetime_coerce.t ..
Dubious, test returned 2 (wstat 512, 0x200)
No subtests run
Cannot determine local time zone
# Tests were run but no plan was declared and done_testing() was not seen.
# Looks like your test exited with 2 just after 5.
t/TimeTracker/find_task_files.t ..
Dubious, test returned 2 (wstat 512, 0x200)
All 5 subtests passed
Cannot determine local time zone
t/TimeTracker/helpers.t ..........
Dubious, test returned 2 (wstat 512, 0x200)
No subtests run
t/Task/start.t ...................
Dubious, test returned 2 (wstat 512, 0x200)
No subtests run
t/Task/storage_location.t ........ ok
Cannot determine local time zone
t/TimeTracker/datetime_coerce.t ..
Dubious, test returned 2 (wstat 512, 0x200)
No subtests run
Cannot determine local time zone
# Tests were run but no plan was declared and done_testing() was not seen.
# Looks like your test exited with 2 just after 5.
t/TimeTracker/find_task_files.t ..
Dubious, test returned 2 (wstat 512, 0x200)
All 5 subtests passed
Cannot determine local time zone
t/TimeTracker/helpers.t ..........
Dubious, test returned 2 (wstat 512, 0x200)
No subtests run
Test Summary Report
-------------------
t/Command/core.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
#####
I have found that assigning a valid timezone value to local $ENV{TZ} enables these tests to PASS. Although that doesn't solve the underlying problem, it *does* have the advantage that it prevents automated installers like cpan to not choke when asked to install your module's reverse dependencies. It will also enable "CPAN-river-focused" automated testing of CPAN modules against perl 5 blead to proceed -- which is a very important consideration now that we're about to release perl-5.28.0.
I will submit a p.r. which I urge you to evaluate, apply and release to CPAN.
Thank you very much.
Jim Keenan