tests: add missing XDG_RUNTIME_DIR env variable

Otherwise the test fails because specifier_runtime() returns -ENOTSUP
when XDG_RUNTIME_DIR is not set.
This commit is contained in:
Ronny Chevalier 2014-06-11 21:20:52 +02:00 committed by Lennart Poettering
parent 94655a1670
commit 6dbfd10471

View file

@ -146,6 +146,7 @@ static int test_unit_printf(void) {
assert_se(setenv("USER", "root", 1) == 0);
assert_se(setenv("HOME", "/root", 1) == 0);
assert_se(setenv("XDG_RUNTIME_DIR", "/run/user/1/", 1) == 0);
assert_se(u = unit_new(m, sizeof(Service)));
assert_se(unit_add_name(u, "blah.service") == 0);