tests should skip if there's no $DISPLAY

Bug #191449 reported by Martin Pool
2
Affects Status Importance Assigned to Milestone
Bazaar GTK+ Frontends
Triaged
Low
Unassigned

Bug Description

If the bzr-gtk tests are run with no $DISPLAY set, we get a lot of warnings, followed by a crash (on Hardy):

/home/mbp/.bazaar/plugins/gtk/diff.py:71: Warning: g_object_unref: assertion `G_IS_OBJECT (object)' failed
  self.add(sourceview)
/home/mbp/.bazaar/plugins/gtk/diff.py:71: GtkWarning: gtk_settings_get_for_screen: assertion `GDK_IS_SCREEN (screen)' failed
  self.add(sourceview)
/home/mbp/.bazaar/plugins/gtk/diff.py:71: GtkWarning: gdk_screen_get_display: assertion `GDK_IS_SCREEN (screen)' failed
  self.add(sourceview)
/home/mbp/.bazaar/plugins/gtk/diff.py:71: GtkWarning: gdk_keymap_get_for_display: assertion `GDK_IS_DISPLAY (display)' failed
  self.add(sourceview)
/home/mbp/.bazaar/plugins/gtk/diff.py:71: Warning: g_object_get: assertion `G_IS_OBJECT (object)' failed
  self.add(sourceview)
zsh: segmentation fault (core dumped) ./bzr selftest
./bzr selftest 398.13s user 26.61s system 60% cpu 11:43.90 total

It would be nice if (on unix) these tests skipped if there was no X display. (I realize detecting whether it's valid will be hard, but just checking the variable is set should be enough.)

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

I can reproduce this.

We shouldn't skip all tests though, as some don't require a display.

Changed in bzr-gtk:
importance: Undecided → Low
status: New → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.