Commit c3a4f74f authored by Rusty Russell's avatar Rusty Russell

ccanlint: depends_accurate: don't detect false dependency when including test files.

Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
parent 682b594d
......@@ -21,8 +21,13 @@ static bool has_dep(struct manifest *m, char **deps, bool *used,
unsigned int i;
/* We can include ourselves, of course. */
if (streq(depname + strlen("ccan/"), m->modname))
return true;
if (strstarts(depname + strlen("ccan/"), m->modname)) {
const char *p = depname + strlen("ccan/") + strlen(m->modname);
/* And our own tests! */
if (streq(p, "/test") || streq(p, ""))
return true;
/* But not any submodules; they need an explicit dep */
}
for (i = 0; deps[i]; i++) {
if (streq(deps[i], depname)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment