]> git.ozlabs.org Git - ccan/blobdiff - tools/run_tests.c
Fix "make check": this is temporary until we use ccanlint for it.
[ccan] / tools / run_tests.c
index e50d1910a210596f09832a691c36267b492d33a2..5ba276fe4dbf7fdf517e0cb7859e9e1061218af3 100644 (file)
@@ -46,7 +46,7 @@ static char *output_name(const char *name)
        return ret;
 }
 
        return ret;
 }
 
-static char *obj_list(void)
+static char *obj_list(const char *dir)
 {
        char *list = talloc_strdup(objs, "");
        struct obj *i;
 {
        char *list = talloc_strdup(objs, "");
        struct obj *i;
@@ -55,7 +55,8 @@ static char *obj_list(void)
                list = talloc_asprintf_append(list, "%s ", i->name);
 
        /* FIXME */
                list = talloc_asprintf_append(list, "%s ", i->name);
 
        /* FIXME */
-       list = talloc_asprintf_append(list, "ccan/tap/tap.o");
+       if (!streq(dir, "tap") && !strends(dir, "/tap"))
+               list = talloc_asprintf_append(list, "ccan/tap/tap.o");
        return list;
 }
 
        return list;
 }
 
@@ -110,8 +111,8 @@ static int build(const char *dir, const char *name, const char *apiobj,
 
        cmd = talloc_asprintf(name, "gcc " CFLAGS " %s -o %s %s %s %s%s %s",
                              fail ? "-DFAIL" : "",
 
        cmd = talloc_asprintf(name, "gcc " CFLAGS " %s -o %s %s %s %s%s %s",
                              fail ? "-DFAIL" : "",
-                             output_name(name), name, apiobj, obj_list(), libs,
-                             verbose ? "" : "> /dev/null 2>&1");
+                             output_name(name), name, apiobj, obj_list(dir),
+                             libs, verbose ? "" : "> /dev/null 2>&1");
 
        if (verbose)
                fprintf(stderr, "Running %s\n", cmd);
 
        if (verbose)
                fprintf(stderr, "Running %s\n", cmd);