Subject: | Fails without X display |
All test scripts fail if "make test" is run without an X display:
...
couldn't connect to display ":0" at /opt/perl-5.28.0/lib/site_perl/5.28.0/x86_64-linux/Tk/MainWindow.pm line 53.
Tk::MainWindow->new() at t/01-leader.t line 21.
# Looks like your test exited with 111 just after 2.
t/01-leader.t ......
Dubious, test returned 111 (wstat 28416, 0x6f00)
Failed 6/8 subtests
...
To protect from this kind of failures, it's best to do something like this (untested):
my $mw = eval { MainWindow->new };
plan skip_all => "Cannot create MainWindow: $@" if !$mw;
plan tests => ...;
# continue normally