summaryrefslogtreecommitdiff
path: root/src/test/test-helper.h
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-02-13 21:13:50 -0500
committerGitHub <noreply@github.com>2017-02-13 21:13:50 -0500
commitf34182f00e5517c22cba81a8886481e804f4cc78 (patch)
tree9ed878e2ae674614a7e5b1798fdb44877fb0e83a /src/test/test-helper.h
parent4a027e1935c630e71efdc829c4b72492ad25cbde (diff)
parent4f8425b8d5a3fb2e5ec24b77f1a7a95db55f532c (diff)
downloadsystemd-f34182f00e5517c22cba81a8886481e804f4cc78.tar.gz
Merge pull request #5298 from martinpitt/relocatable-tests
test: make unit tests relocatable and add an "install-tests" make target
Diffstat (limited to 'src/test/test-helper.h')
-rw-r--r--src/test/test-helper.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/test/test-helper.h b/src/test/test-helper.h
index ddb10f88fd..4e633ae6d8 100644
--- a/src/test/test-helper.h
+++ b/src/test/test-helper.h
@@ -20,6 +20,8 @@
***/
#include "sd-daemon.h"
+#include "string-util.h"
+#include "tests.h"
#include "macro.h"
@@ -39,3 +41,6 @@
-ENOENT, \
-ENOMEDIUM /* cannot determine cgroup */ \
)
+
+#define TEST_DATA_DIR(subdir) \
+ strjoina(getenv("TEST_DIR") ?: get_exe_relative_testdata_dir(), subdir)