From f4934c042124757e256f8131b0e5b319d963acae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Sat, 3 Sep 2022 00:15:51 +0200 Subject: [PATCH] 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: --- src/gnome-shell-perf-tool.in | 3 ++- tests/data/background.png | Bin 0 -> 9050 bytes tests/meson.build | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 tests/data/background.png 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 0000000000000000000000000000000000000000..cbe3f097c05048a648032d9af46370039039f2e9 GIT binary patch literal 9050 zcmeAS@N?(olHy`uVBq!ia0y~yU~gbxV6os}0*a(>3=?5sU~I{Bb`J1#c2+1T%1_J8 zNo8Qrm{>c}*5j~)%+dJZrCOrw+8q`tEBtgjx-7Cpy8;xiaILkP5%WvYB-0}(Muzoz zQ?q<`D7$!itZWRc;|Jy=7f*U#boKfZACw{Z_+X*^y}Q+S_A<9r&CCotF0tU{wwZov zM{@F9dG;=nW?~a?@=2R!sO_owqi=mR%a1DY=aK)O|C8C9buY=mL1kWITc+@OVgKA) zY|m>SacG~^`e<2rW(l{DeNpVkAHBsFQybIW&iGXISvcv4-Hymi4l^=+Ry*|-my}o|o+-C-pA`U32bOZz(WjnP&aCxZuQKwnogzf$*Ue}-K zt$3YH!tz;QBiqfd&HoR+&s%%w$d2hEehhQ<`#u{owUjlwoh{tgFT1>uiDiDH_TH!K zuQa~&zm%=3TgCDvms$L}uJ27|z4C^G>dt1V;arzQxL6V z7$je5l`_l7FfDdH75BNaJiI#p|Gdm^-QiYBG{FuVXp3ul2xWHAGSo-znCRxGtI z0}8U2c>21sKjUN)HPsEf%sv+=Bw6AbQR1ARo12&*>EMg{?f0}e+5{5%<_Znz)YVr%|=Co|9(28Oz5Aut_auz(T7 z@Q}Cw=Bw~zfN3E%6EMxmECr$)S{Qjjw8NnWHW00l=m0in!l?GqpaZ6d(PYEGFq&n6 z<=AL(F)Mw&;F&Xr=#c?SwRPgg&ebxsLQ0Qpj(L;wH) literal 0 HcmV?d00001 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: ':')