X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=tools%2Fccanlint%2Ftests%2Fbuild_objs.c;fp=tools%2Fccanlint%2Ftests%2Fbuild_objs.c;h=0000000000000000000000000000000000000000;hb=5f44c8ca0eb66503db51e0df1b65ff173eb42f57;hp=2f189e859f25a8b523505609cafd31c429e3a443;hpb=382e1e2900997b5cc5f28c350c6fcb54d4859ecc;p=ccan diff --git a/tools/ccanlint/tests/build_objs.c b/tools/ccanlint/tests/build_objs.c deleted file mode 100644 index 2f189e85..00000000 --- a/tools/ccanlint/tests/build_objs.c +++ /dev/null @@ -1,58 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -static const char *can_build(struct manifest *m) -{ - if (safe_mode) - return "Safe mode enabled"; - return NULL; -} - -static void *check_objs_build(struct manifest *m) -{ - char *report = NULL; - struct ccan_file *i; - - list_for_each(&m->c_files, i, list) { - char *err; - - /* One point for each obj file. */ - build_objs.total_score++; - - i->compiled = compile_object(m, i->name, &err); - if (!i->compiled) { - if (report) - report = talloc_append_string(report, err); - else - report = err; - } - } - return report; -} - -static const char *describe_objs_build(struct manifest *m, void *check_result) -{ - return check_result; -} - -struct ccanlint build_objs = { - .name = "Module object files can be built", - .check = check_objs_build, - .describe = describe_objs_build, - .can_run = can_build, -}; - -REGISTER_TEST(build_objs, &depends_exist, NULL);