Commit f9423c17 authored by Rusty Russell's avatar Rusty Russell

ccanlint: rename test keys

Joey Adams rightly points out that the current keys are a mess: ideally the
filenames, test keys and structure names in ccanlint should be the same.

First step is to make the test names all regular, of basic form <noun>_<verb>
(eg "tests_exist" rather than "has-tests").
parent 1e7c49e0
......@@ -67,7 +67,7 @@
*
* Ccanlint:
* // valgrind breaks fcntl locks.
* valgrind-tests FAIL
* tests_pass_valgrind FAIL
*/
int main(int argc, char *argv[])
{
......
......@@ -66,7 +66,7 @@
*
* Ccanlint:
* // hash fails because it accesses data in 4 byte quantities for speed.
* valgrind-tests --partial-loads-ok=yes
* tests_pass_valgrind --partial-loads-ok=yes
*/
int main(int argc, char *argv[])
{
......
......@@ -74,7 +74,7 @@ static void do_build(struct manifest *m,
}
struct ccanlint build = {
.key = "build",
.key = "module_builds",
.name = "Module can be built from object files",
.check = do_build,
.can_run = can_build,
......
......@@ -58,7 +58,7 @@ static void check_objs_build(struct manifest *m,
}
struct ccanlint build_objs = {
.key = "build-objects",
.key = "objects_build",
.name = "Module object files can be built",
.check = check_objs_build,
.can_run = can_build,
......
......@@ -84,7 +84,7 @@ static void check_use_build(struct manifest *m,
}
struct ccanlint check_build = {
.key = "check-link",
.key = "module_links",
.name = "Module can be linked against trivial program",
.check = check_use_build,
.can_run = can_build,
......
......@@ -101,7 +101,7 @@ static void check_depends_built(struct manifest *m,
}
struct ccanlint depends_built = {
.key = "depends-built",
.key = "depends_build",
.name = "Module's CCAN dependencies can be found or built",
.check = check_depends_built,
.can_run = can_build,
......
......@@ -69,8 +69,8 @@ static void check_depends_exist(struct manifest *m,
}
struct ccanlint depends_exist = {
.key = "depends-exist",
.name = "Module's CCAN dependencies are present",
.key = "depends_exist",
.name = "Module's CCAN dependencies can be found",
.check = check_depends_exist,
};
......
......@@ -68,7 +68,7 @@ static void check_includes_build(struct manifest *m,
}
struct ccanlint includes_build = {
.key = "include-main",
.key = "main_header_compiles",
.name = "Modules main header compiles",
.check = check_includes_build,
.can_run = can_build,
......
......@@ -75,7 +75,7 @@ static void create_info_template(struct manifest *m, struct score *score)
}
struct ccanlint has_info = {
.key = "info",
.key = "info_exists",
.name = "Module has _info file",
.check = check_has_info,
.handle = create_info_template,
......
......@@ -34,7 +34,7 @@ static void check_has_main_header(struct manifest *m,
}
struct ccanlint has_main_header = {
.key = "has-main-header",
.key = "main_header_exists",
.name = "Module has main header file",
.check = check_has_main_header,
};
......
......@@ -143,8 +143,8 @@ static void do_compile_coverage_tests(struct manifest *m,
}
struct ccanlint compile_coverage_tests = {
.key = "compile-coverage-tests",
.name = "Module tests compile with profiling",
.key = "tests_compile_coverage",
.name = "Module tests compile with " COVERAGE_CFLAGS,
.check = do_compile_coverage_tests,
.can_run = can_run_coverage,
};
......
......@@ -65,7 +65,7 @@ static void do_compile_test_helpers(struct manifest *m,
}
struct ccanlint compile_test_helpers = {
.key = "compile-helpers",
.key = "tests_helpers_compile",
.name = "Module test helper objects compile",
.check = do_compile_test_helpers,
.can_run = can_run,
......
......@@ -131,7 +131,7 @@ static void do_compile_tests(struct manifest *m,
}
struct ccanlint compile_tests = {
.key = "compile-tests",
.key = "tests_compile",
.name = "Module tests compile",
.check = do_compile_tests,
.can_run = can_build,
......
......@@ -87,8 +87,8 @@ static void check_depends_accurate(struct manifest *m,
}
struct ccanlint depends_accurate = {
.key = "depends-accurate",
.name = "Module's CCAN dependencies are the only ccan files #included",
.key = "depends_accurate",
.name = "Module's CCAN dependencies are the only CCAN files #included",
.check = check_depends_accurate,
};
......
......@@ -615,7 +615,7 @@ static void build_examples(struct manifest *m, bool keep,
}
struct ccanlint examples_compile = {
.key = "examples-compile",
.key = "examples_compile",
.name = "Module examples compile",
.check = build_examples,
.can_run = can_run,
......
......@@ -272,7 +272,7 @@ static void run_examples(struct manifest *m, bool keep,
}
struct ccanlint examples_run = {
.key = "examples-run",
.key = "examples_run",
.name = "Module examples with expected output give that output",
.check = run_examples,
.can_run = can_run,
......
......@@ -110,8 +110,8 @@ static void extract_examples(struct manifest *m,
}
struct ccanlint has_examples = {
.key = "has-examples",
.name = "_info and header files have examples",
.key = "examples_exist",
.name = "_info and main header file have Example: sections",
.check = extract_examples,
};
......
......@@ -91,7 +91,7 @@ static void check_has_info_documentation(struct manifest *m,
}
struct ccanlint has_info_documentation = {
.key = "info-documentation",
.key = "info_documentation_exists",
.name = "Module has documentation in _info",
.check = check_has_info_documentation,
};
......
......@@ -125,8 +125,8 @@ static void check_has_tests(struct manifest *m,
}
struct ccanlint has_tests = {
.key = "has-tests",
.name = "Module has tests",
.key = "tests_exist",
.name = "Module has test directory with tests in it",
.check = check_has_tests,
};
......
......@@ -194,7 +194,7 @@ static void check_idempotent(struct manifest *m,
}
struct ccanlint idempotent = {
.key = "idempotent",
.key = "headers_idempotent",
.name = "Module headers are #ifndef/#define wrapped",
.check = check_idempotent,
.handle = handle_idem,
......
......@@ -148,8 +148,8 @@ static void check_has_license(struct manifest *m,
}
struct ccanlint has_license = {
.key = "has-license",
.name = "Module has license",
.key = "license_exists",
.name = "Module has License: entry in _info, and LICENSE symlink/file",
.check = check_has_license,
};
......
......@@ -163,8 +163,8 @@ static void do_run_coverage_tests(struct manifest *m,
}
struct ccanlint run_coverage_tests = {
.key = "test-coverage",
.name = "Code coverage of module tests",
.key = "tests_coverage",
.name = "Module's tests cover all the code",
.check = do_run_coverage_tests,
};
......
......@@ -66,7 +66,7 @@ static void run_under_debugger(struct manifest *m, struct score *score)
}
struct ccanlint run_tests = {
.key = "run",
.key = "tests_pass",
.name = "Module's run and api tests pass",
.check = do_run_tests,
.handle = run_under_debugger,
......
......@@ -178,7 +178,7 @@ static void run_under_debugger_vg(struct manifest *m, struct score *score)
}
struct ccanlint run_tests_vg = {
.key = "valgrind-tests",
.key = "tests_pass_valgrind",
.name = "Module's run and api tests succeed under valgrind",
.can_run = can_run_vg,
.check = do_run_tests_vg,
......@@ -189,7 +189,7 @@ struct ccanlint run_tests_vg = {
REGISTER_TEST(run_tests_vg, &run_tests, NULL);
struct ccanlint run_tests_vg_leak = {
.key = "valgrind-leaks",
.key = "tests_pass_valgrind_noleaks",
.name = "Module's run and api tests leak memory",
.check = do_leakcheck_vg,
};
......
......@@ -50,7 +50,7 @@ static void check_trailing_whitespace(struct manifest *m,
}
struct ccanlint trailing_whitespace = {
.key = "trailing-whitespace",
.key = "no_trailing_whitespace",
.name = "Module's source code has no trailing whitespace",
.check = check_trailing_whitespace,
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment