const char *output;
};
-static void *do_run_tests(struct manifest *m)
+static void *do_run_tests(struct manifest *m,
+ bool keep,
+ unsigned int *timeleft)
{
struct list_head *list = talloc(m, struct list_head);
struct run_tests_result *res;
list_for_each(&m->run_tests, i, list) {
run_tests.total_score++;
- /* FIXME: timeout here */
- cmdout = run_command(m, i->compiled);
+ cmdout = run_command(m, timeleft, i->compiled);
if (cmdout) {
res = talloc(list, struct run_tests_result);
res->file = i;
list_for_each(&m->api_tests, i, list) {
run_tests.total_score++;
- /* FIXME: timeout here */
- cmdout = run_command(m, i->compiled);
+ cmdout = run_command(m, timeleft, i->compiled);
if (cmdout) {
res = talloc(list, struct run_tests_result);
res->file = i;
return descrip;
}
+/* Gcc's warn_unused_result is fascist bullshit. */
+#define doesnt_matter()
+
static void run_under_debugger(struct manifest *m, void *check_result)
{
char *command;
first = list_top(list, struct run_tests_result, list);
command = talloc_asprintf(m, "gdb -ex 'break tap.c:136' -ex 'run' %s",
first->file->compiled);
- system(command);
+ if (system(command))
+ doesnt_matter();
}
struct ccanlint run_tests = {
- .name = "run and api tests run successfully",
+ .key = "run",
+ .name = "Module's run and api tests pass",
.score = score_run_tests,
.check = do_run_tests,
.describe = describe_run_tests,