Set $HOME for tests.

We add $HOME to the environment variables we define for a test case
in order to redirect it from the user's actual home directory. This
is necessary because xcb-util-xrm will fall back to $HOME/.Xresources
when determining the DPI. If a user has this set to, e.g., 192 on their
machine, this would break tests.

Since tests shouldn't rely on the system they run in, we redirect the
home directory altogether to simulate a clean slate.

relates to #2465
This commit is contained in:
Ingo Bürk 2016-09-24 23:48:33 +02:00
parent cb1fcfed6a
commit 889d0abe8f
1 changed files with 3 additions and 2 deletions

View File

@ -112,8 +112,9 @@ sub worker_wait {
$test->failure_output(\*STDERR);
$test->todo_output(\*STDOUT);
@ENV{qw(DISPLAY TESTNAME OUTDIR VALGRIND STRACE XTRACE COVERAGE RESTART)}
= ($self->{display},
@ENV{qw(HOME DISPLAY TESTNAME OUTDIR VALGRIND STRACE XTRACE COVERAGE RESTART)}
= ($outdir,
$self->{display},
basename($file),
$outdir,
$options->{valgrind},