gtk3/debian/tests/python3-gi
Simon McVittie dfa31ce3c1 d/tests, d/run-tests.sh: Copy run-with-display from gtk4
This should make the build-time tests a bit more robust, by using the
-noreset option to avoid a race condition (see #981201).
2023-01-03 12:44:55 +00:00

28 lines
514 B
Bash
Executable File

#!/bin/sh
export NO_AT_BRIDGE=1
# Workaround for #1025312
export LIBGL_ALWAYS_SOFTWARE=1
exec \
debian/tests/run-with-display x11 \
dbus-run-session -- \
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