ccanlint: rename test keys
authorRusty Russell <rusty@rustcorp.com.au>
Fri, 7 Jan 2011 11:48:41 +0000 (22:18 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Fri, 7 Jan 2011 11:48:41 +0000 (22:18 +1030)
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").

25 files changed:
ccan/tdb/_info
ccan/tdb2/_info
tools/ccanlint/compulsory_tests/build.c
tools/ccanlint/compulsory_tests/build_objs.c
tools/ccanlint/compulsory_tests/check_build.c
tools/ccanlint/compulsory_tests/check_depends_built.c
tools/ccanlint/compulsory_tests/check_depends_exist.c
tools/ccanlint/compulsory_tests/check_includes_build.c
tools/ccanlint/compulsory_tests/has_info.c
tools/ccanlint/compulsory_tests/has_main_header.c
tools/ccanlint/tests/build-coverage.c
tools/ccanlint/tests/compile_test_helpers.c
tools/ccanlint/tests/compile_tests.c
tools/ccanlint/tests/depends_accurate.c
tools/ccanlint/tests/examples_compile.c
tools/ccanlint/tests/examples_run.c
tools/ccanlint/tests/has_examples.c
tools/ccanlint/tests/has_info_documentation.c
tools/ccanlint/tests/has_tests.c
tools/ccanlint/tests/idempotent.c
tools/ccanlint/tests/license.c
tools/ccanlint/tests/run-coverage.c
tools/ccanlint/tests/run_tests.c
tools/ccanlint/tests/run_tests_valgrind.c
tools/ccanlint/tests/trailing_whitespace.c

index f7cf273c1131f00c1c1c9a5d0007d3855f7236a6..53ac6059c0bffe7c0a3a207bb6fe7202c6e5db1f 100644 (file)
@@ -67,7 +67,7 @@
  *
  * Ccanlint:
  *     // valgrind breaks fcntl locks.
- *     valgrind-tests FAIL
+ *     tests_pass_valgrind FAIL
  */
 int main(int argc, char *argv[])
 {
index 53dd1ce2d53baacf39e8764c97a5d0bf95ec6ff4..49131d2edc511d5d03ca7f2e6e1fccfa33ebd1eb 100644 (file)
@@ -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[])
 {
index fee79b10c82499574482e2f5913258e19d9107fd..557b708bf7144c2237caa0c44d93c9771cf8d04b 100644 (file)
@@ -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,
index d26844941c859e10d85fa2e7ae27148fefea98da..9393f62f11eb4507dc3ca76330e279a03fb136c8 100644 (file)
@@ -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,
index b7935f015d6982aa0fca24d9ba4b03585ca1c54f..39f16c2e0e8fd15f2bd21e5c354014c68ed67ea4 100644 (file)
@@ -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,
index b1ba40cb40493be87ae46bb6cb307ef3d79b4a2a..41b9a8cae3ff19d28b106501a7fb46d0213aa7da 100644 (file)
@@ -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,
index 1423b40f0357b74dac9edad1c74ec59f2d494447..ffbf4539bf6f07ad31a3e8aaaf8390ceb8b2f9f0 100644 (file)
@@ -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,
 };
 
index 4e2badda9ce3ff6863812b3a9c5d3734745779a4..017194e6a890abab8d54457b649cc90d33c4820c 100644 (file)
@@ -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,
index ce131f85686ec88111c1b0ea709a04c77fbbcc50..5b71efa4fc9fd9c1304098a5e134d51a3c513e29 100644 (file)
@@ -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,
index bce6ef485a2b448778e0aefd69742e426ce243b7..338f7af789fece9a2b99f222002d0d777908288e 100644 (file)
@@ -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,
 };
index 31bb7882fed96956da8677dfb9541989852a1b6a..927cd8b077dbaf813af63e5f7f696421096e0652 100644 (file)
@@ -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,
 };
index 5763463ad178e709df940b168ad68b1fe9ba19b5..0169f6024f21b3e263d5423bd168d16c498b539c 100644 (file)
@@ -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,
index 80ebe913da7b227945d15e227225e16d609773c8..e1e8f82061f4ae81661677e842c437acf1532374 100644 (file)
@@ -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,
index 943fa350e09b3a8d6bc8ffc10c990f3e12e4a8d7..85301772c8193d259ac97f42195b8408480d914e 100644 (file)
@@ -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,
 };
 
index 5b0195d6ca2a526dd877f63bd8035a0798b915e6..ff9e529b645a8d46b39f4c4a2e2c976221402905 100644 (file)
@@ -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,
index 103e1798f03b0c5eea721917322ccdd8cd18f14a..7fe41654b443cdf28da5c7f6e910efc9d33e1d2e 100644 (file)
@@ -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,
index 31afaecf3774fd251061489a3be01532d3dcd29a..1e4f65c3396cd825b5a619d2608b6b5bd6ce05d9 100644 (file)
@@ -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,
 };
 
index 0a1788fd7d4fa8447239c5ab095584eafaf25c63..a6aafc66e6c304a739ba287e6ff70b5c11bdafc0 100644 (file)
@@ -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,
 };
index 0a510a034629b62d10bffa5ab06b04cfb043b0c3..36adee60998a0c8477c415875620324e34603bd0 100644 (file)
@@ -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,
 };
 
index e39cc2ac2e7ba696f16077c8b2d0724ce1f3e9fd..944fd24820d7160e4756c08ee19ec2db3a977fab 100644 (file)
@@ -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,
index 35a4d39379fdf92d641fe31a74a628a0ee18bc16..bc0ee45464a688dcc8a6738be4b62b0e7faf0ad8 100644 (file)
@@ -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,
 };
 
index 7f2b3c24a0f7766d49d322d892ce3d83723c0a8e..1e34039834083df8c7aead5404fec0edcf702b8c 100644 (file)
@@ -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,
 };
 
index f32e0534ff11d1272e3e76c0ceb3498e6e155e8e..3821b36a761259ae2c480dba3fc193b99861c3e5 100644 (file)
@@ -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,
index ec3a31981c21f01331fd6d1a934a95f33f452f60..6e18338d19f0c2edf3a119d4805f5fe02913f6ed 100644 (file)
@@ -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,
 };
index ea8b5787982c2914541133642b3460682a52a4ee..2a301ea8b1c077af8bb369e1d2c64cf893080a8d 100644 (file)
@@ -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,
 };