Skip to content
Snippets Groups Projects
Commit 065cffd8 authored by Simon McVittie's avatar Simon McVittie
Browse files

wrap-setup test: Set a mock home directory


Otherwise, we can't test behaviours that depend on the home directory.

Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent 00073507
No related branches found
No related tags found
1 merge request!785Export parent directory of LD_PRELOAD modules
...@@ -259,6 +259,10 @@ setup (Fixture *f, ...@@ -259,6 +259,10 @@ setup (Fixture *f,
g_assert_no_error (local_error); g_assert_no_error (local_error);
f->bwrap = flatpak_bwrap_new (flatpak_bwrap_empty_env); f->bwrap = flatpak_bwrap_new (flatpak_bwrap_empty_env);
f->context->original_environ = g_environ_setenv (f->context->original_environ,
"HOME",
"/home/me",
TRUE);
/* Some tests need to know where Steam is installed; /* Some tests need to know where Steam is installed;
* pretend that we have it installed in /steam */ * pretend that we have it installed in /steam */
f->context->original_environ = g_environ_setenv (f->context->original_environ, f->context->original_environ = g_environ_setenv (f->context->original_environ,
...@@ -461,6 +465,7 @@ teardown (Fixture *f, ...@@ -461,6 +465,7 @@ teardown (Fixture *f,
g_clear_object (&f->context); g_clear_object (&f->context);
g_clear_object (&f->mock_host); g_clear_object (&f->mock_host);
g_clear_pointer (&f->home, g_free);
g_clear_pointer (&f->mock_runtime, g_free); g_clear_pointer (&f->mock_runtime, g_free);
g_clear_pointer (&f->home, g_free); g_clear_pointer (&f->home, g_free);
g_clear_pointer (&f->tmpdir, g_free); g_clear_pointer (&f->tmpdir, g_free);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment