]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/test/test-path.c
test: make unit tests relocatable
[thirdparty/systemd.git] / src / test / test-path.c
index 4d3f0e994807567d1a0316056267cc0c1fda3137..d09df3e8a5fe6af87270c8274608b4701201a453 100644 (file)
@@ -56,7 +56,7 @@ static int setup_test(Manager **m) {
         STRV_FOREACH(test_path, tests_path) {
                 _cleanup_free_ char *p = NULL;
 
-                p = strjoin("/tmp/test-path_", *test_path, NULL);
+                p = strjoin("/tmp/test-path_", *test_path);
                 assert_se(p);
 
                 (void) rm_rf(p, REMOVE_ROOT|REMOVE_PHYSICAL);
@@ -263,7 +263,7 @@ int main(int argc, char *argv[]) {
         log_open();
 
         assert_se(runtime_dir = setup_fake_runtime_dir());
-        assert_se(set_unit_path(TEST_DIR "/test-path/") >= 0);
+        assert_se(set_unit_path(TEST_DATA_DIR("/test-path/")) >= 0);
 
         for (test = tests; test && *test; test++) {
                 int r;