mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
tests: Drop wrapper script for unit test runner
We build a small run-js-test executable so tests run in a similar environment as gnome-shell, and then wrap it with a generated script that provides environment variables like GI_TYPELIB_PATH. This is more complicated than it needs to be, we can just as well set up the typelib search path from the runner and pass in the environment via meson. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3164>
This commit is contained in:
parent
3d9c40783f
commit
1fcdc60ca0
5 changed files with 23 additions and 60 deletions
|
|
@ -1,12 +1,3 @@
|
|||
testconf = configuration_data()
|
||||
testconf.set('MUTTER_TYPELIB_DIR', mutter_typelibdir)
|
||||
testconf.set('srcdir', meson.current_source_dir())
|
||||
run_test = configure_file(
|
||||
input: 'run-test.sh.in',
|
||||
output: 'run-test.sh',
|
||||
configuration: testconf
|
||||
)
|
||||
|
||||
mutter_tests_datadir = mutter_test_dep.get_variable('tests_datadir')
|
||||
dbusrunnerconf = configuration_data()
|
||||
dbusrunnerconf.set('MUTTER_TEST_PKGDATADIR', mutter_tests_datadir)
|
||||
|
|
@ -18,6 +9,16 @@ dbus_runner = configure_file(
|
|||
configuration: dbusrunnerconf,
|
||||
)
|
||||
|
||||
gvc_typelib_path = fs.parent(libgvc.get_variable('libgvc_gir')[1].full_path())
|
||||
shell_typelib_path = fs.parent(libshell_gir[1].full_path())
|
||||
st_typelib_path = fs.parent(libst_gir[1].full_path())
|
||||
|
||||
unit_testenv = environment()
|
||||
unit_testenv.set('GNOME_SHELL_DATADIR', data_builddir)
|
||||
unit_testenv.append('GI_TYPELIB_PATH', gvc_typelib_path, separator: ':')
|
||||
unit_testenv.append('GI_TYPELIB_PATH', shell_typelib_path, separator: ':')
|
||||
unit_testenv.append('GI_TYPELIB_PATH', st_typelib_path, separator: ':')
|
||||
|
||||
unit_tests = [
|
||||
'highlighter',
|
||||
'injectionManager',
|
||||
|
|
@ -34,6 +35,7 @@ foreach test : unit_tests
|
|||
test(test, run_test,
|
||||
args: 'unit/@0@.js'.format(test),
|
||||
suite: 'unit',
|
||||
env: unit_testenv,
|
||||
workdir: meson.current_source_dir())
|
||||
endforeach
|
||||
|
||||
|
|
@ -53,7 +55,6 @@ shell_tests = [
|
|||
},
|
||||
]
|
||||
|
||||
gvc_typelib_path = fs.parent(libgvc.get_variable('libgvc_gir')[1].full_path())
|
||||
libgvc_path = fs.parent(libgvc.get_variable('libgvc').full_path())
|
||||
|
||||
background_file = join_paths(meson.current_source_dir(), 'data', 'background.png')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue