
This will run glib-compile-schemas in the test data directory. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3973>
27 lines
740 B
Python
Executable File
27 lines
740 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
import sys
|
|
import os
|
|
|
|
sys.path.insert(1, '@tests_datadir@')
|
|
|
|
from mutter_dbusrunner import MutterDBusRunner, meta_run
|
|
|
|
def add_extra_args(parser):
|
|
parser.add_argument('--compile-schemas', action='store_true', default=[])
|
|
|
|
def handle_extra_args(args):
|
|
if args.compile_schemas:
|
|
print('Compiling schemas in @tests_datadir@')
|
|
os.system('glib-compile-schemas @tests_datadir@')
|
|
|
|
if __name__ == '__main__':
|
|
extra_env = {}
|
|
extra_env['GSETTINGS_SCHEMA_DIR'] = '@tests_datadir@'
|
|
|
|
result = meta_run(MutterDBusRunner,
|
|
extra_env=extra_env,
|
|
setup_argparse=add_extra_args,
|
|
handle_argparse=handle_extra_args)
|
|
sys.exit(result)
|