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_run(struct manifest *m)
20 return "Safe mode enabled";
24 static char *compile(struct manifest *m,
26 struct ccan_file *cfile)
29 cfile->compiled = maybe_temp_file(m, ".o", keep, cfile->fullname);
30 if (compile_object(m, cfile->fullname, ccan_dir, "",
31 cfile->compiled, &output)) {
38 static void do_compile_test_helpers(struct manifest *m,
40 unsigned int *timeleft,
45 if (list_empty(&m->other_test_c_files))
48 list_for_each(&m->other_test_c_files, i, list) {
49 char *cmdout = compile(m, keep, i);
51 score->error = "Failed to compile helper C files";
52 score_file_error(score, i, 0, cmdout);
58 score->score = score->total;
62 struct ccanlint compile_test_helpers = {
63 .key = "compile-helpers",
64 .name = "Module test helper objects compile",
65 .check = do_compile_test_helpers,
69 REGISTER_TEST(compile_test_helpers, &depends_built, &has_tests, NULL);