Commit 04b63db6 authored by Rusty Russell's avatar Rusty Russell

ccanlint: handle circular test-depends.

eg. asort depends on order, but order testdepends on asort.

Probably not the greatest thing to do, but don't barf because of it.
Reported-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
parent 5cdc505e
......@@ -103,8 +103,11 @@ static void check_test_depends_exist(struct manifest *m,
if (!strstarts(deps[i], "ccan/"))
continue;
/* Don't add dependency twice: we can only be on one list! */
/* Don't add dependency twice: we can only be on one list!
* Also, it's possible to have circular test depends, so drop
* self-refs. */
if (!have_dep(m, deps[i])
&& !streq(deps[i] + strlen("ccan/"), m->modname)
&& !add_dep(m, &m->test_deps, deps[i], score))
return;
......
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