tests/perf: Use custom solid background in tests
They don't measure performance, and we don't want to have to install gnome-backgrounds, so bundle a solid color background image to use instead. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1349>
This commit is contained in:
parent
bcc4d15fdf
commit
f4934c0421
@ -36,7 +36,8 @@ def start_shell(perf_output=None):
|
||||
env['SHELL_PERF_OUTPUT'] = perf_output
|
||||
|
||||
# A fixed background image
|
||||
env['SHELL_BACKGROUND_IMAGE'] = '@pkgdatadir@/perf-background.xml'
|
||||
if os.getenv('SHELL_BACKGROUND_IMAGE') is None:
|
||||
env['SHELL_BACKGROUND_IMAGE'] = '@pkgdatadir@/perf-background.xml'
|
||||
|
||||
self_dir = os.path.dirname(os.path.abspath(sys.argv[0]))
|
||||
args = []
|
||||
|
BIN
tests/data/background.png
Normal file
BIN
tests/data/background.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.8 KiB |
@ -46,11 +46,14 @@ perf_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 = files(join_paths('data', 'background.png'))
|
||||
|
||||
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.set('SHELL_BACKGROUND_IMAGE', '@0@'.format(background_file))
|
||||
perf_testenv.append('GI_TYPELIB_PATH', gvc_typelib_path, separator: ':')
|
||||
perf_testenv.append('LD_LIBRARY_PATH', libgvc_path, separator: ':')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user