tests: Add test running basic perf test

This test runs all of GNOME Shell using the headless backend inside a
mocked D-Bus environment. The basic test tests, well, basic things, like
the panel menu, the overview, showing the app grid view, as well as
going back to the session view.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1349>
This commit is contained in:
Jonas Ådahl
2022-08-17 16:43:13 +02:00
parent 4c10608451
commit bcc4d15fdf
5 changed files with 42 additions and 10 deletions

View File

@ -38,3 +38,29 @@ foreach test : tests
env: testenv,
workdir: meson.current_source_dir())
endforeach
perf_tests = [
'basic',
]
gvc_typelib_path = fs.parent(libgvc.get_variable('libgvc_gir')[1].full_path())
libgvc_path = fs.parent(libgvc.get_variable('libgvc').full_path())
perf_testenv = testenv
perf_testenv.set('G_DEBUG', 'fatal-criticals')
perf_testenv.set('G_MESSAGES_DEBUG', 'GNOME Shell')
perf_testenv.set('GNOME_SHELL_DATADIR', data_builddir)
perf_testenv.set('GNOME_SHELL_BUILDDIR', src_builddir)
perf_testenv.append('GI_TYPELIB_PATH', gvc_typelib_path, separator: ':')
perf_testenv.append('LD_LIBRARY_PATH', libgvc_path, separator: ':')
foreach perf_test : perf_tests
test('perf-' + perf_test, dbus_runner,
args: [
perf_tool,
'--headless',
'--perf=@0@'.format(perf_test),
],
env: perf_testenv,
)
endforeach