Comment 6 for bug 1024346

Revision history for this message
Martin Pitt (pitti) wrote : Re: lucid upgrade to precise universe failed: test python import failed

It is a bit unfortunate that stderr from the redirects is redirected to a "/tmp/....stderr" file which is then not attached as an artifact.

I installed compizconfig-settings-manager in my precise chroot, and with a $DISPLAY the import works just fine. But without a $DISPLAY (which is what happens in the dist-upgrade tester, I suppose) I get

$ DISPLAY= python -c 'import ccm'
Gtk-Message: Failed to load module "overlay-scrollbar"
/usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:57: GtkWarning: could not open display
  warnings.warn(str(e), _gtk.Warning)
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/ccm/__init__.py", line 1, in <module>
    from ccm.Conflicts import *
  File "/usr/lib/python2.7/dist-packages/ccm/Conflicts.py", line 26, in <module>
    from ccm.Constants import *
  File "/usr/lib/python2.7/dist-packages/ccm/Constants.py", line 30, in <module>
    CurrentScreenNum = gtk.gdk.display_get_default().get_default_screen().get_number()
AttributeError: 'NoneType' object has no attribute 'get_default_screen'

This will also hit us with thigs like "import gtk" and similar. So I think we should rather run the whole test under xvfb-run, so that modules that need an X server/$DISPLAY will succeed. We also need to fix stderr handling from that test, to add the .stderr file as an artifact.