diff --git a/src/gnome-shell-perf-tool.in b/src/gnome-shell-perf-tool.in index ae8a84d9f..79d1d6c23 100755 --- a/src/gnome-shell-perf-tool.in +++ b/src/gnome-shell-perf-tool.in @@ -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 = [] diff --git a/tests/data/background.png b/tests/data/background.png new file mode 100644 index 000000000..cbe3f097c Binary files /dev/null and b/tests/data/background.png differ diff --git a/tests/meson.build b/tests/meson.build index 8c0202861..739b74cd0 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -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: ':')