X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=tools%2Fccanlint%2Ftests%2Frun_tests.c;h=0edfad262c4ba02299052231691b23ce40784ff7;hp=0a8434c6e5a35563bfd3eae06f61cbf0e7554c84;hb=2926cafb52b9d95646d9dafa877d53f2368d8b2c;hpb=a40b318e7a07a452ae7456053727bd11b2fa49b4 diff --git a/tools/ccanlint/tests/run_tests.c b/tools/ccanlint/tests/run_tests.c index 0a8434c6..0edfad26 100644 --- a/tools/ccanlint/tests/run_tests.c +++ b/tools/ccanlint/tests/run_tests.c @@ -35,11 +35,11 @@ static void do_run_tests(struct manifest *m, foreach_ptr(list, &m->run_tests, &m->api_tests) { list_for_each(list, i, list) { score->total++; - cmdout = run_command(m, timeleft, i->compiled); - if (cmdout) - score_file_error(score, i, 0, cmdout); - else + if (run_command(m, timeleft, &cmdout, "%s", + i->compiled)) score->score++; + else + score_file_error(score, i, 0, cmdout); } } @@ -65,12 +65,13 @@ static void run_under_debugger(struct manifest *m, struct score *score) doesnt_matter(); } -struct ccanlint run_tests = { - .key = "run", +struct ccanlint tests_pass = { + .key = "tests_pass", .name = "Module's run and api tests pass", .check = do_run_tests, .handle = run_under_debugger, .can_run = can_run, + .needs = "tests_compile" }; -REGISTER_TEST(run_tests, &compile_tests, NULL); +REGISTER_TEST(tests_pass);