Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test suite fails (without a X11 display?) #9

Open
eserte opened this issue May 22, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@eserte
Copy link

commented May 22, 2019

If there's no DISPLAY available, then the test suite fails:

Output from './Build test':

# Electron binary: /home/cpansand/.cpan/build/2019052217/Alien-Electron-0.201-0/blib/lib/auto/share/dist/Alien-Electron/electron

(electron:15599): Gtk-WARNING **: 17:18:17.793: cannot open display: 

(electron:15602): Gtk-WARNING **: 17:18:17.901: cannot open display: 

#   Failed test 'saw expected output'
#   at t/runs.t line 18.
#                   ''
#     doesn't match '(?^:node\.js is running)'
# Looks like you failed 1 test of 4.
t/runs.t .. 
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/4 subtests 

The Gtk warnings does not happen on all systems --- on these systems it's hard to guess what's going wrong with the test suite.

@hoytech

This comment has been minimized.

Copy link
Owner

commented May 23, 2019

Interesting, thanks for the report. Not really sure what to do about this, electron probably doesn't have a concept of running "headless". I wonder if it's possible to stub out the X11 display during tests?

@eserte

This comment has been minimized.

Copy link
Author

commented May 23, 2019

In Tk tests I do something like this:

my $mw = eval { new MainWindow };
if (!$mw) {
    plan skip_all => "cannot open DISPLAY: $@";
}

Not sure if something like this is possible with electron.

Test coverage on CPAN Testers would be still be sufficient, as some smoke systems run with Xvfb or vncserver.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.