Browse Source

ccanlint: fix compilation of API tests with coverage

They expect to be linked against the module objects.
Rusty Russell 15 years ago
parent
commit
c1da4104d9
1 changed files with 4 additions and 1 deletions
  1. 4 1
      tools/ccanlint/tests/tests_compile_coverage.c

+ 4 - 1
tools/ccanlint/tests/tests_compile_coverage.c

@@ -127,7 +127,10 @@ static void do_compile_coverage_tests(struct manifest *m,
 
 
 	foreach_ptr(h, &m->run_tests, &m->api_tests) {
 	foreach_ptr(h, &m->run_tests, &m->api_tests) {
 		list_for_each(h, i, list) {
 		list_for_each(h, i, list) {
-			cmdout = cov_compile(m, m, i, NULL, keep);
+			cmdout = cov_compile(m, m, i,
+					     h == &m->api_tests
+					     ? modobjs : NULL,
+					     keep);
 			if (cmdout) {
 			if (cmdout) {
 				score_file_error(score, i, 0,
 				score_file_error(score, i, 0,
 				  "Failed to compile test with coverage: %s",
 				  "Failed to compile test with coverage: %s",