Files
gtk3/debian/tests/python3-gi
Simon McVittie 7c271ab98e Force software rendering during tests
Workaround for Mesa regression #1025312. We expect only software
rendering to be available in a buildd or autopkgtest environment anyway.
2022-12-02 15:31:57 +00:00

26 lines
490 B
Bash
Executable File

#!/bin/sh
export NO_AT_BRIDGE=1
# Workaround for #1025312
export LIBGL_ALWAYS_SOFTWARE=1
xvfb-run -a -s "-screen 0 1024x768x24" \
python3 <<EOF
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import GLib, Gtk
def do_quit(user_data):
Gtk.main_quit()
return GLib.SOURCE_REMOVE
dialog = Gtk.Dialog()
dialog.set_title('Test dialog')
dialog.add_button(Gtk.STOCK_OK, Gtk.ResponseType.ACCEPT)
dialog.show_all()
GLib.timeout_add_seconds(1, do_quit, None)
Gtk.main()
EOF