Subject: | Test suite fails without an X11 display |
If the test suite is running without an X11 display (e.g. a headless Unix server):
...
PERL_DL_NONLAZY=1 "/opt/perl-5.30.1/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
couldn't connect to display ":0" at /opt/perl-5.30.1/lib/site_perl/5.30.1/x86_64-linux/Tk/MainWindow.pm line 53.
Tk::MainWindow->new(-title,Language::Logo version 1.000) at /home/cpansand/.cpan/build/2020021518/Language-Logo-1.000-1/blib/lib/Language/Logo.pm line 404.
Use of uninitialized value $ans in chomp at /home/cpansand/.cpan/build/2020021518/Language-Logo-1.000-1/blib/lib/Language/Logo.pm line 206.
Use of uninitialized value $ans in pattern match (m//) at /home/cpansand/.cpan/build/2020021518/Language-Logo-1.000-1/blib/lib/Language/Logo.pm line 207.
Use of uninitialized value $ans in concatenation (.) or string at /home/cpansand/.cpan/build/2020021518/Language-Logo-1.000-1/blib/lib/Language/Logo.pm line 208.
Language::Logo: expected 'id:name', got ''
# Looks like your test exited with 104 just after 1.
t/Language-Logo.t ..
Dubious, test returned 104 (wstat 26624, 0x6800)
Failed 15/16 subtests
...
Here's a possible technique to prevent such test failures:
https://github.com/eserte/tk-widgetdump/blob/d2aaf7d16412095dbcad68e79a77077e5cc7714c/t/widgetdump.t#L26-L32