diff options
author | Simon McVittie <smcv@collabora.com> | 2021-08-26 12:46:38 +0100 |
---|---|---|
committer | Simon McVittie <smcv@collabora.com> | 2021-08-26 21:40:16 +0100 |
commit | 7bf6ecfaa22740daac66e35476c74583c707007c (patch) | |
tree | 7f93f9427c8b1b92ec20bfb936fd564302f3ed76 /tests/test-run.sh | |
parent | dac93eecbc11759c9368ad4394b7025a6468dd63 (diff) | |
download | flatpak-7bf6ecfaa22740daac66e35476c74583c707007c.tar.gz |
tests: Don't reset XDG_RUNTIME_DIR locally
If we do, it interferes with xdg-dbus-proxy, causing test failure under
some circumstances: the test passes on a development system, but fails
when run on a qemu virtual machine in Debian's autopkgtest framework.
Fixes: 6e5b02e2 "run: Don't let XDG_RUNTIME_DIR from user override the value we set"
Signed-off-by: Simon McVittie <smcv@collabora.com>
Diffstat (limited to 'tests/test-run.sh')
-rw-r--r-- | tests/test-run.sh | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/test-run.sh b/tests/test-run.sh index 994ce1cf..b28cf7b6 100644 --- a/tests/test-run.sh +++ b/tests/test-run.sh @@ -74,11 +74,14 @@ assert_file_has_content hello_out '^Hello world, from a sandbox$' ok "hello" -XDG_RUNTIME_DIR="$(pwd)/xrd" run_sh org.test.Platform 'echo $XDG_RUNTIME_DIR' > value-in-sandbox +# XDG_RUNTIME_DIR is set to <temp directory>/runtime by libtest.sh, +# so we always have the necessary setup to reproduce #4372 +assert_not_streq "$XDG_RUNTIME_DIR" "/run/user/$(id -u)" +run_sh org.test.Platform 'echo $XDG_RUNTIME_DIR' > value-in-sandbox head value-in-sandbox >&2 assert_file_has_content value-in-sandbox "^/run/user/$(id -u)\$" -ok "XDG_RUNTIME_DIR not inherited" +ok "XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR not inherited" run_sh org.test.Platform cat /.flatpak-info >runtime-fpi assert_file_has_content runtime-fpi "[Runtime]" |