1 #include <tools/ccanlint/ccanlint.h>
2 #include <tools/tools.h>
3 #include <ccan/talloc/talloc.h>
4 #include <ccan/str/str.h>
17 static const char *can_build(struct manifest *m)
20 return "Safe mode enabled";
24 static char *compile(struct manifest *m,
26 struct ccan_file *cfile)
28 cfile->compiled = maybe_temp_file(m, ".o", keep, cfile->fullname);
29 return compile_object(m, cfile->fullname, ccan_dir, "",
33 static void *do_compile_test_helpers(struct manifest *m,
35 unsigned int *timeleft)
40 compile_tests.total_score = 0;
41 list_for_each(&m->other_test_c_files, i, list) {
42 compile_tests.total_score++;
43 cmdout = compile(m, keep, i);
45 return talloc_asprintf(m,
46 "Failed to compile helper C"
53 static const char *describe_compile_test_helpers(struct manifest *m,
59 struct ccanlint compile_test_helpers = {
60 .key = "compile-helpers",
61 .name = "Module test helper objects compile",
63 .check = do_compile_test_helpers,
64 .describe = describe_compile_test_helpers,
68 REGISTER_TEST(compile_test_helpers, &depends_built, &has_tests, NULL);