summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2011-01-07 22:20:04 +1030
committerRusty Russell <rusty@rustcorp.com.au>2011-01-07 22:20:04 +1030
commit2926cafb52b9d95646d9dafa877d53f2368d8b2c (patch)
tree37f763f52fe57c0ccf29fbb6566e0a17248feced
parent016a19d260cd7f4afeb5b2b2cc28c8bbed1cd170 (diff)
ccanlint: rename structures to match keys
-rw-r--r--tools/ccanlint/compulsory_tests/build.c4
-rw-r--r--tools/ccanlint/compulsory_tests/build_objs.c4
-rw-r--r--tools/ccanlint/compulsory_tests/check_build.c4
-rw-r--r--tools/ccanlint/compulsory_tests/check_depends_built.c4
-rw-r--r--tools/ccanlint/compulsory_tests/check_includes_build.c4
-rw-r--r--tools/ccanlint/compulsory_tests/has_info.c4
-rw-r--r--tools/ccanlint/compulsory_tests/has_main_header.c4
-rw-r--r--tools/ccanlint/tests/build-coverage.c4
-rw-r--r--tools/ccanlint/tests/compile_test_helpers.c4
-rw-r--r--tools/ccanlint/tests/compile_tests.c4
-rw-r--r--tools/ccanlint/tests/has_examples.c4
-rw-r--r--tools/ccanlint/tests/has_info_documentation.c12
-rw-r--r--tools/ccanlint/tests/has_tests.c14
-rw-r--r--tools/ccanlint/tests/idempotent.c4
-rw-r--r--tools/ccanlint/tests/license.c4
-rw-r--r--tools/ccanlint/tests/run-coverage.c4
-rw-r--r--tools/ccanlint/tests/run_tests.c4
-rw-r--r--tools/ccanlint/tests/run_tests_valgrind.c8
-rw-r--r--tools/ccanlint/tests/trailing_whitespace.c4
19 files changed, 49 insertions, 49 deletions
diff --git a/tools/ccanlint/compulsory_tests/build.c b/tools/ccanlint/compulsory_tests/build.c
index cf128f6a..9d697a30 100644
--- a/tools/ccanlint/compulsory_tests/build.c
+++ b/tools/ccanlint/compulsory_tests/build.c
@@ -73,7 +73,7 @@ static void do_build(struct manifest *m,
score->score = score->total;
}
-struct ccanlint build = {
+struct ccanlint module_builds = {
.key = "module_builds",
.name = "Module can be built from object files",
.check = do_build,
@@ -81,4 +81,4 @@ struct ccanlint build = {
.needs = "objects_build"
};
-REGISTER_TEST(build);
+REGISTER_TEST(module_builds);
diff --git a/tools/ccanlint/compulsory_tests/build_objs.c b/tools/ccanlint/compulsory_tests/build_objs.c
index 7696b464..13d34a14 100644
--- a/tools/ccanlint/compulsory_tests/build_objs.c
+++ b/tools/ccanlint/compulsory_tests/build_objs.c
@@ -57,7 +57,7 @@ static void check_objs_build(struct manifest *m,
}
}
-struct ccanlint build_objs = {
+struct ccanlint objects_build = {
.key = "objects_build",
.name = "Module object files can be built",
.check = check_objs_build,
@@ -65,4 +65,4 @@ struct ccanlint build_objs = {
.needs = "depends_exist"
};
-REGISTER_TEST(build_objs);
+REGISTER_TEST(objects_build);
diff --git a/tools/ccanlint/compulsory_tests/check_build.c b/tools/ccanlint/compulsory_tests/check_build.c
index db2e16d5..83b1c780 100644
--- a/tools/ccanlint/compulsory_tests/check_build.c
+++ b/tools/ccanlint/compulsory_tests/check_build.c
@@ -83,7 +83,7 @@ static void check_use_build(struct manifest *m,
}
}
-struct ccanlint check_build = {
+struct ccanlint module_links = {
.key = "module_links",
.name = "Module can be linked against trivial program",
.check = check_use_build,
@@ -91,4 +91,4 @@ struct ccanlint check_build = {
.needs = "module_builds depends_build"
};
-REGISTER_TEST(check_build);
+REGISTER_TEST(module_links);
diff --git a/tools/ccanlint/compulsory_tests/check_depends_built.c b/tools/ccanlint/compulsory_tests/check_depends_built.c
index c4c649dd..bb1f6ca3 100644
--- a/tools/ccanlint/compulsory_tests/check_depends_built.c
+++ b/tools/ccanlint/compulsory_tests/check_depends_built.c
@@ -100,7 +100,7 @@ static void check_depends_built(struct manifest *m,
score->score = score->total;
}
-struct ccanlint depends_built = {
+struct ccanlint depends_build = {
.key = "depends_build",
.name = "Module's CCAN dependencies can be found or built",
.check = check_depends_built,
@@ -108,4 +108,4 @@ struct ccanlint depends_built = {
.needs = "depends_exist"
};
-REGISTER_TEST(depends_built);
+REGISTER_TEST(depends_build);
diff --git a/tools/ccanlint/compulsory_tests/check_includes_build.c b/tools/ccanlint/compulsory_tests/check_includes_build.c
index 56930e30..296b0a39 100644
--- a/tools/ccanlint/compulsory_tests/check_includes_build.c
+++ b/tools/ccanlint/compulsory_tests/check_includes_build.c
@@ -67,7 +67,7 @@ static void check_includes_build(struct manifest *m,
}
}
-struct ccanlint includes_build = {
+struct ccanlint main_header_compiles = {
.key = "main_header_compiles",
.name = "Modules main header compiles",
.check = check_includes_build,
@@ -75,4 +75,4 @@ struct ccanlint includes_build = {
.needs = "depends_exist main_header_exists"
};
-REGISTER_TEST(includes_build);
+REGISTER_TEST(main_header_compiles);
diff --git a/tools/ccanlint/compulsory_tests/has_info.c b/tools/ccanlint/compulsory_tests/has_info.c
index b61ee0ae..a9a6c1c9 100644
--- a/tools/ccanlint/compulsory_tests/has_info.c
+++ b/tools/ccanlint/compulsory_tests/has_info.c
@@ -74,7 +74,7 @@ static void create_info_template(struct manifest *m, struct score *score)
fclose(info);
}
-struct ccanlint has_info = {
+struct ccanlint info_exists = {
.key = "info_exists",
.name = "Module has _info file",
.check = check_has_info,
@@ -82,4 +82,4 @@ struct ccanlint has_info = {
.needs = ""
};
-REGISTER_TEST(has_info);
+REGISTER_TEST(info_exists);
diff --git a/tools/ccanlint/compulsory_tests/has_main_header.c b/tools/ccanlint/compulsory_tests/has_main_header.c
index 259aa347..68ea1359 100644
--- a/tools/ccanlint/compulsory_tests/has_main_header.c
+++ b/tools/ccanlint/compulsory_tests/has_main_header.c
@@ -33,11 +33,11 @@ static void check_has_main_header(struct manifest *m,
m->basename, m->basename);
}
-struct ccanlint has_main_header = {
+struct ccanlint main_header_exists = {
.key = "main_header_exists",
.name = "Module has main header file",
.check = check_has_main_header,
.needs = ""
};
-REGISTER_TEST(has_main_header);
+REGISTER_TEST(main_header_exists);
diff --git a/tools/ccanlint/tests/build-coverage.c b/tools/ccanlint/tests/build-coverage.c
index 55eca373..115ae94a 100644
--- a/tools/ccanlint/tests/build-coverage.c
+++ b/tools/ccanlint/tests/build-coverage.c
@@ -142,7 +142,7 @@ static void do_compile_coverage_tests(struct manifest *m,
}
}
-struct ccanlint compile_coverage_tests = {
+struct ccanlint tests_compile_coverage = {
.key = "tests_compile_coverage",
.name = "Module tests compile with " COVERAGE_CFLAGS,
.check = do_compile_coverage_tests,
@@ -150,4 +150,4 @@ struct ccanlint compile_coverage_tests = {
.needs = "tests_compile"
};
-REGISTER_TEST(compile_coverage_tests);
+REGISTER_TEST(tests_compile_coverage);
diff --git a/tools/ccanlint/tests/compile_test_helpers.c b/tools/ccanlint/tests/compile_test_helpers.c
index aa62e37a..0ad5a7e6 100644
--- a/tools/ccanlint/tests/compile_test_helpers.c
+++ b/tools/ccanlint/tests/compile_test_helpers.c
@@ -64,7 +64,7 @@ static void do_compile_test_helpers(struct manifest *m,
}
}
-struct ccanlint compile_test_helpers = {
+struct ccanlint tests_helpers_compile = {
.key = "tests_helpers_compile",
.name = "Module test helper objects compile",
.check = do_compile_test_helpers,
@@ -72,4 +72,4 @@ struct ccanlint compile_test_helpers = {
.needs = "depends_build tests_exist"
};
-REGISTER_TEST(compile_test_helpers);
+REGISTER_TEST(tests_helpers_compile);
diff --git a/tools/ccanlint/tests/compile_tests.c b/tools/ccanlint/tests/compile_tests.c
index c61a9e5a..4d868679 100644
--- a/tools/ccanlint/tests/compile_tests.c
+++ b/tools/ccanlint/tests/compile_tests.c
@@ -130,7 +130,7 @@ static void do_compile_tests(struct manifest *m,
score->score = 1 + !warnings;
}
-struct ccanlint compile_tests = {
+struct ccanlint tests_compile = {
.key = "tests_compile",
.name = "Module tests compile",
.check = do_compile_tests,
@@ -138,4 +138,4 @@ struct ccanlint compile_tests = {
.needs = "tests_helpers_compile objects_build"
};
-REGISTER_TEST(compile_tests);
+REGISTER_TEST(tests_compile);
diff --git a/tools/ccanlint/tests/has_examples.c b/tools/ccanlint/tests/has_examples.c
index a1d54c48..947d76a4 100644
--- a/tools/ccanlint/tests/has_examples.c
+++ b/tools/ccanlint/tests/has_examples.c
@@ -109,11 +109,11 @@ static void extract_examples(struct manifest *m,
score->pass = score->score != 0;
}
-struct ccanlint has_examples = {
+struct ccanlint examples_exist = {
.key = "examples_exist",
.name = "_info and main header file have Example: sections",
.check = extract_examples,
.needs = "info_exists"
};
-REGISTER_TEST(has_examples);
+REGISTER_TEST(examples_exist);
diff --git a/tools/ccanlint/tests/has_info_documentation.c b/tools/ccanlint/tests/has_info_documentation.c
index b98177d8..a5316fe0 100644
--- a/tools/ccanlint/tests/has_info_documentation.c
+++ b/tools/ccanlint/tests/has_info_documentation.c
@@ -15,7 +15,7 @@
#include <ccan/noerr/noerr.h>
#include <ccan/grab_file/grab_file.h>
-extern struct ccanlint has_info_documentation;
+extern struct ccanlint info_documentation_exists;
static void create_info_template_doc(struct manifest *m, struct score *score)
{
@@ -58,7 +58,7 @@ static void create_info_template_doc(struct manifest *m, struct score *score)
}
}
-static void check_has_info_documentation(struct manifest *m,
+static void check_info_documentation_exists(struct manifest *m,
bool keep,
unsigned int *timeleft,
struct score *score)
@@ -83,7 +83,7 @@ static void check_has_info_documentation(struct manifest *m,
score->error = "_info file has no module documentation.\n\n"
"CCAN modules use /**-style comments for documentation: the\n"
"overall documentation belongs in the _info metafile.\n";
- has_info_documentation.handle = create_info_template_doc;
+ info_documentation_exists.handle = create_info_template_doc;
} else if (!description) {
score->error = "_info file has no module description.\n\n"
"The lines after the first summary line in the _info file\n"
@@ -92,11 +92,11 @@ static void check_has_info_documentation(struct manifest *m,
}
}
-struct ccanlint has_info_documentation = {
+struct ccanlint info_documentation_exists = {
.key = "info_documentation_exists",
.name = "Module has documentation in _info",
- .check = check_has_info_documentation,
+ .check = check_info_documentation_exists,
.needs = "info_exists"
};
-REGISTER_TEST(has_info_documentation);
+REGISTER_TEST(info_documentation_exists);
diff --git a/tools/ccanlint/tests/has_tests.c b/tools/ccanlint/tests/has_tests.c
index 0e90d16f..bdfe49d5 100644
--- a/tools/ccanlint/tests/has_tests.c
+++ b/tools/ccanlint/tests/has_tests.c
@@ -10,7 +10,7 @@
#include <err.h>
#include <ccan/talloc/talloc.h>
-extern struct ccanlint has_tests;
+extern struct ccanlint tests_exist;
static void handle_no_tests(struct manifest *m, struct score *score)
{
@@ -92,7 +92,7 @@ static void handle_no_tests(struct manifest *m, struct score *score)
fclose(run);
}
-static void check_has_tests(struct manifest *m,
+static void check_tests_exist(struct manifest *m,
bool keep,
unsigned int *timeleft, struct score *score)
{
@@ -103,7 +103,7 @@ static void check_has_tests(struct manifest *m,
score->error = "No test directory";
if (errno != ENOENT)
err(1, "statting %s", test_dir);
- has_tests.handle = handle_no_tests;
+ tests_exist.handle = handle_no_tests;
return;
}
@@ -117,7 +117,7 @@ static void check_has_tests(struct manifest *m,
&& list_empty(&m->compile_ok_tests)) {
if (list_empty(&m->compile_fail_tests)) {
score->error = "No tests in test directory";
- has_tests.handle = handle_no_tests;
+ tests_exist.handle = handle_no_tests;
} else
score->error = "No positive tests in test directory";
return;
@@ -126,11 +126,11 @@ static void check_has_tests(struct manifest *m,
score->score = score->total;
}
-struct ccanlint has_tests = {
+struct ccanlint tests_exist = {
.key = "tests_exist",
.name = "Module has test directory with tests in it",
- .check = check_has_tests,
+ .check = check_tests_exist,
.needs = ""
};
-REGISTER_TEST(has_tests);
+REGISTER_TEST(tests_exist);
diff --git a/tools/ccanlint/tests/idempotent.c b/tools/ccanlint/tests/idempotent.c
index a5210e2f..340a0698 100644
--- a/tools/ccanlint/tests/idempotent.c
+++ b/tools/ccanlint/tests/idempotent.c
@@ -193,7 +193,7 @@ static void check_idempotent(struct manifest *m,
}
}
-struct ccanlint idempotent = {
+struct ccanlint headers_idempotent = {
.key = "headers_idempotent",
.name = "Module headers are #ifndef/#define wrapped",
.check = check_idempotent,
@@ -201,4 +201,4 @@ struct ccanlint idempotent = {
.needs = ""
};
-REGISTER_TEST(idempotent);
+REGISTER_TEST(headers_idempotent);
diff --git a/tools/ccanlint/tests/license.c b/tools/ccanlint/tests/license.c
index 1ffee9e2..965a159f 100644
--- a/tools/ccanlint/tests/license.c
+++ b/tools/ccanlint/tests/license.c
@@ -149,11 +149,11 @@ static void check_has_license(struct manifest *m,
score->score = score->total;
}
-struct ccanlint has_license = {
+struct ccanlint license_exists = {
.key = "license_exists",
.name = "Module has License: entry in _info, and LICENSE symlink/file",
.check = check_has_license,
.needs = "info_exists"
};
-REGISTER_TEST(has_license);
+REGISTER_TEST(license_exists);
diff --git a/tools/ccanlint/tests/run-coverage.c b/tools/ccanlint/tests/run-coverage.c
index a3e83c1c..af8d6f21 100644
--- a/tools/ccanlint/tests/run-coverage.c
+++ b/tools/ccanlint/tests/run-coverage.c
@@ -162,11 +162,11 @@ static void do_run_coverage_tests(struct manifest *m,
analyze_coverage(m, full_gcov, cmdout, score);
}
-struct ccanlint run_coverage_tests = {
+struct ccanlint tests_coverage = {
.key = "tests_coverage",
.name = "Module's tests cover all the code",
.check = do_run_coverage_tests,
.needs = "tests_compile_coverage tests_pass"
};
-REGISTER_TEST(run_coverage_tests);
+REGISTER_TEST(tests_coverage);
diff --git a/tools/ccanlint/tests/run_tests.c b/tools/ccanlint/tests/run_tests.c
index 35790ece..0edfad26 100644
--- a/tools/ccanlint/tests/run_tests.c
+++ b/tools/ccanlint/tests/run_tests.c
@@ -65,7 +65,7 @@ static void run_under_debugger(struct manifest *m, struct score *score)
doesnt_matter();
}
-struct ccanlint run_tests = {
+struct ccanlint tests_pass = {
.key = "tests_pass",
.name = "Module's run and api tests pass",
.check = do_run_tests,
@@ -74,4 +74,4 @@ struct ccanlint run_tests = {
.needs = "tests_compile"
};
-REGISTER_TEST(run_tests);
+REGISTER_TEST(tests_pass);
diff --git a/tools/ccanlint/tests/run_tests_valgrind.c b/tools/ccanlint/tests/run_tests_valgrind.c
index d3cdb9c7..30a806eb 100644
--- a/tools/ccanlint/tests/run_tests_valgrind.c
+++ b/tools/ccanlint/tests/run_tests_valgrind.c
@@ -179,7 +179,7 @@ static void run_under_debugger_vg(struct manifest *m, struct score *score)
doesnt_matter();
}
-struct ccanlint run_tests_vg = {
+struct ccanlint tests_pass_valgrind = {
.key = "tests_pass_valgrind",
.name = "Module's run and api tests succeed under valgrind",
.can_run = can_run_vg,
@@ -189,13 +189,13 @@ struct ccanlint run_tests_vg = {
.needs = "tests_pass"
};
-REGISTER_TEST(run_tests_vg);
+REGISTER_TEST(tests_pass_valgrind);
-struct ccanlint run_tests_vg_leak = {
+struct ccanlint tests_pass_valgrind_noleaks = {
.key = "tests_pass_valgrind_noleaks",
.name = "Module's run and api tests leak memory",
.check = do_leakcheck_vg,
.needs = "tests_pass_valgrind"
};
-REGISTER_TEST(run_tests_vg_leak);
+REGISTER_TEST(tests_pass_valgrind_noleaks);
diff --git a/tools/ccanlint/tests/trailing_whitespace.c b/tools/ccanlint/tests/trailing_whitespace.c
index 2b430e8c..a66fd74c 100644
--- a/tools/ccanlint/tests/trailing_whitespace.c
+++ b/tools/ccanlint/tests/trailing_whitespace.c
@@ -49,7 +49,7 @@ static void check_trailing_whitespace(struct manifest *m,
}
}
-struct ccanlint trailing_whitespace = {
+struct ccanlint no_trailing_whitespace = {
.key = "no_trailing_whitespace",
.name = "Module's source code has no trailing whitespace",
.check = check_trailing_whitespace,
@@ -57,4 +57,4 @@ struct ccanlint trailing_whitespace = {
};
-REGISTER_TEST(trailing_whitespace);
+REGISTER_TEST(no_trailing_whitespace);