pidgin/pidgin

06dcfb1cc1b2
Parents a1db3bb55aac
Children ba5964adbf7f
Set XDG_CONFIG_DIR for all unittests so they can run in a silo

Testing Done:
Ran the tests and make sure they kept working without issue.

Reviewed at https://reviews.imfreedom.org/r/1587/
--- a/libpurple/protocols/jabber/tests/meson.build Fri Aug 12 03:29:50 2022 -0500
+++ b/libpurple/protocols/jabber/tests/meson.build Sat Aug 13 22:06:44 2022 -0500
@@ -4,5 +4,9 @@
link_with : [jabber_prpl],
dependencies : [libxml, libpurple_dep, libsoup, glib])
- test('jabber_' + prog, e)
+ jabberenv = environment()
+ jabberenv.set('XDG_CONFIG_DIR', meson.current_build_dir() / 'config')
+
+ test('jabber_' + prog, e,
+ env: jabberenv)
endforeach
--- a/libpurple/protocols/sametime/tests/meson.build Fri Aug 12 03:29:50 2022 -0500
+++ b/libpurple/protocols/sametime/tests/meson.build Sat Aug 13 22:06:44 2022 -0500
@@ -4,6 +4,10 @@
link_with : [sametime_prpl],
dependencies : [libpurple_dep, gmime, glib])
+ stenv = environment()
+ stenv.set('G_TEST_SRCDIR', meson.current_source_dir())
+ stenv.set('XDG_CONFIG_DIR', meson.current_build_dir() / 'config')
+
test('sametime_' + prog, e,
- env : 'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()))
+ env : stenv)
endforeach
--- a/libpurple/tests/meson.build Fri Aug 12 03:29:50 2022 -0500
+++ b/libpurple/tests/meson.build Sat Aug 13 22:06:44 2022 -0500
@@ -34,6 +34,9 @@
dependencies: [libpurple_dep, glib]
)
+testenv = environment()
+testenv.set('XDG_CONFIG_HOME', meson.current_build_dir() / 'config')
+
foreach prog : PROGS
e = executable('test_' + prog, 'test_@0@.c'.format(prog),
c_args : [
@@ -42,5 +45,7 @@
dependencies : [libpurple_dep, glib],
link_with: test_ui,
)
- test(prog, e)
+ test(prog, e,
+ env: testenv,
+ )
endforeach