Test *Cairo context has methods when created from a C function* fails (Expected 'ImageSurface' to equal 'Surface')
Hi!
I'm trying to build gjs
with jhbuild
using Ubuntu 17.10 in a VirtualBox machine and it succeeds -- but jhbuild make check
don't, it fails with
============================================================================
Testsuite summary for gjs 1.51.4
============================================================================
# TOTAL: 807
# PASS: 791
# SKIP: 14
# XFAIL: 0
# FAIL: 1
# XPASS: 0
# ERROR: 1
============================================================================
See ./test-suite.log
Please report to http://bugzilla.gnome.org/enter_bug.cgi?product=gjs
============================================================================
From ./test-suite.log
:
FAIL: installed-tests/js/testCairo.js 22 Cairo context has methods when created from a C function
# Message: Expected 'ImageSurface' to equal 'Surface'.
# Stack:
# @/home/valentin/jhbuild/checkout/gjs/installed-tests/js/testCairo.js:184:13
Do you know what can be happening with my system? I've followed the instructions from https://gitlab.gnome.org/GNOME/gjs/blob/master/doc/Hacking.md .
Also, I see that the test that fails is this one ( https://gitlab.gnome.org/GNOME/gjs/blob/master/installed-tests/js/testCairo.js#L176 ):
it('has methods when created from a C function', function () {
let win = new Gtk.OffscreenWindow();
let da = new Gtk.DrawingArea();
win.add(da);
da.realize();
cr = Gdk.cairo_create(da.window);
expect(cr.save).toBeDefined();
expect(_ts(cr.getTarget())).toEqual('Surface');
});
But I can see another test passing ( https://gitlab.gnome.org/GNOME/gjs/blob/master/installed-tests/js/testCairo.js#L29 ):
let cr, surface;
beforeEach(function () {
surface = new Cairo.ImageSurface(Cairo.Format.ARGB32, 1, 1);
cr = new Cairo.Context(surface);
});
// [...]
it('reports its target surface', function () {
expect(_ts(cr.getTarget())).toEqual('ImageSurface');
});
Shouldn't be the same type? Indeed, changing line 184 to expect(_ts(cr.getTarget())).toEqual('ImageSurface');
makes the test suite pass.