From 29c59e05146152bb2f3561152a8cfa63ce2d37a7 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 6 Oct 2010 13:58:30 +1030 Subject: [PATCH 1/1] ccanlint: link api tests against compiled objects Don't assume that ../modulename.o already built! --- tools/ccanlint/compulsory_tests/compile_tests.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/ccanlint/compulsory_tests/compile_tests.c b/tools/ccanlint/compulsory_tests/compile_tests.c index e633facd..1559bd18 100644 --- a/tools/ccanlint/compulsory_tests/compile_tests.c +++ b/tools/ccanlint/compulsory_tests/compile_tests.c @@ -36,8 +36,10 @@ static char *obj_list(const struct manifest *m, bool link_with_module) list_for_each(&m->other_test_c_files, i, list) list = talloc_asprintf_append(list, " %s", i->compiled); + /* Our own object files. */ if (link_with_module) - list = talloc_asprintf_append(list, " %s.o", m->dir); + list_for_each(&m->c_files, i, list) + list = talloc_asprintf_append(list, " %s", i->compiled); /* Other ccan modules. */ list_for_each(&m->dep_dirs, i, list) { @@ -199,4 +201,4 @@ struct ccanlint compile_tests = { .can_run = can_build, }; -REGISTER_TEST(compile_tests, &compile_test_helpers, NULL); +REGISTER_TEST(compile_tests, &compile_test_helpers, &build_objs, NULL); -- 2.39.2