1
0
Fork 0

tests: Install most tests

Tests that needs to run in a virtual machine are excluded.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3973>
This commit is contained in:
Jonas Ådahl 2024-08-22 13:59:20 +02:00 committed by Marge Bot
parent 51b2a9a500
commit 4fe6a5fad9
2 changed files with 47 additions and 0 deletions

View file

@ -0,0 +1,5 @@
[Test]
Description=Mutter test: @testname@
Exec=sh -ec 'env G_TEST_SRCDIR=@pkgdatadir@ G_TEST_BUILDDIR=@libexecdir@/installed-tests/mutter-@apiversion@ MUTTER_REF_TEST_RESULT_DIR=@reftestresultdir@ @libexecdir@/installed-tests/mutter-@apiversion@/mutter-installed-dbus-session.py @runnerargs@ -- @libexecdir@/installed-tests/mutter-@apiversion@/@testexecutable@'
Type=session
Output=TAP

View file

@ -303,6 +303,9 @@ test_cases += [
'name': 'keybindings',
'suite': 'input',
'sources': [ 'keybindings.c' ],
'installed_runner_args': [
'--compile-schemas',
],
},
]
@ -911,4 +914,43 @@ if have_installed_tests
install_dir: mutter_installed_tests_datadir,
)
endforeach
install_subdir('monitor-configs', install_dir: tests_datadir)
install_subdir('migration', install_dir: tests_datadir)
install_subdir('ref-tests', install_dir: tests_datadir)
install_subdir('icc-profiles', install_dir: tests_datadir)
install_data('org.gnome.mutter.test.gschema.xml', install_dir: tests_datadir)
foreach test_case: test_cases
if test_case.has_key('installed_runner_args')
runner_args = test_case['installed_runner_args']
else
runner_args = []
endif
if test_case.has_key('launch')
foreach service: test_case['launch']
runner_args += '--launch=@0@'.format(service)
endforeach
endif
installed_tests_cdata = configuration_data()
installed_tests_cdata.set('apiversion', libmutter_api_version)
installed_tests_cdata.set('libexecdir', libexecdir)
installed_tests_cdata.set('pkgdatadir', pkgdatadir)
installed_tests_cdata.set('reftestresultdir', '/tmp/mutter-ref-test-results')
installed_tests_cdata.set('testname', test_case['name'])
installed_tests_cdata.set('testexecutable', 'mutter-' + test_case['name'])
installed_tests_cdata.set('runnerargs', ' '.join(runner_args))
configure_file(
input: 'generic.test.in',
output: test_case['name'] + '.test',
configuration: installed_tests_cdata,
install: true,
install_dir: mutter_installed_tests_datadir,
)
endforeach
endif