tests: Extract D-Bus runner as reusable python module

The D-Bus runner used by tests, including installed tests, is made to be
reusable from GNOME Shell. To do this, install it and the templates in
the pkgdatadir (e.g. /usr/share/mutter-APIVERSION/tests/), generate a
custom runner for the installed tests that uses the installed script and
templates, and change the non-installed original runner to use the
non-installed templates.

The end goal is to reuse the D-Bus session runner and templates used for
mutter when test running GNOME Shell.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1354>
This commit is contained in:
Jonas Ådahl
2022-08-16 15:50:33 +02:00
committed by Marge Bot
parent 4bc5833144
commit b1cc591ef5
5 changed files with 238 additions and 192 deletions

View File

@ -0,0 +1,11 @@
#!/usr/bin/env python3
import sys
sys.path.insert(1, '@tests_datadir@')
from mutter_dbusrunner import MutterDBusRunner, meta_run
if __name__ == '__main__':
result = meta_run(MutterDBusRunner)
sys.exit(result)