summaryrefslogtreecommitdiff
path: root/src/test/test-unit-name.c
diff options
context:
space:
mode:
authorRonny Chevalier <chevalier.ronny@gmail.com>2014-06-11 21:20:52 +0200
committerLennart Poettering <lennart@poettering.net>2014-06-30 12:40:47 +0200
commit6dbfd104711fa53d35b52cb54ed4557c9099145f (patch)
tree7ff1c5a1baf6b23eeb87290f80432c6334b496dc /src/test/test-unit-name.c
parent94655a1670aef827eee6751c986da4bb4ecee6d4 (diff)
tests: add missing XDG_RUNTIME_DIR env variable
Otherwise the test fails because specifier_runtime() returns -ENOTSUP when XDG_RUNTIME_DIR is not set.
Diffstat (limited to 'src/test/test-unit-name.c')
-rw-r--r--src/test/test-unit-name.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/test/test-unit-name.c b/src/test/test-unit-name.c
index 9179081279..db728bcefb 100644
--- a/src/test/test-unit-name.c
+++ b/src/test/test-unit-name.c
@@ -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);