]> git.ozlabs.org Git - ccan/blobdiff - tools/ccanlint/compulsory_tests/has_tests.c
ccanlint: fix directory issues properly.
[ccan] / tools / ccanlint / compulsory_tests / has_tests.c
index cd31d2229cca047d41c758c7702d58bf1c7f725c..46998d58cb0bb40148f050aa0c64c0bc6413e7f3 100644 (file)
@@ -15,10 +15,11 @@ static char test_is_not_dir[] = "test is not a directory";
 static void *check_has_tests(struct manifest *m)
 {
        struct stat st;
+       char *test_dir = talloc_asprintf(m, "%s/test", m->dir);
 
-       if (lstat("test", &st) != 0) {
+       if (lstat(test_dir, &st) != 0) {
                if (errno != ENOENT)
-                       err(1, "statting test/");
+                       err(1, "statting %s", test_dir);
                return "You have no test directory";
        }