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 *objname(const void *ctx, const char *cfile)
26 return talloc_asprintf(ctx, "%.*s.o ", strlen(cfile) - 2, cfile);
29 static char *compile(struct manifest *m, const char *cfile)
33 obj = objname(m, cfile);
34 return compile_object(m, obj, cfile);
37 static void *do_compile_test_helpers(struct manifest *m)
42 list_for_each(&m->other_test_c_files, i, list) {
43 compile_tests.total_score++;
44 cmdout = compile(m, i->name);
46 return talloc_asprintf(m,
47 "Failed to compile helper C"
54 static const char *describe_compile_test_helpers(struct manifest *m,
60 struct ccanlint compile_test_helpers = {
61 .name = "Compiling test helper files",
63 .check = do_compile_test_helpers,
64 .describe = describe_compile_test_helpers,
68 REGISTER_TEST(compile_test_helpers, &depends_built);