From 7fbe0c3882313369d16ae234ef4cf2f128c477f3 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Thu, 21 Jul 2011 19:01:11 +0200 Subject: [PATCH] test: `run-tests helper_name` runs helper in same process Fixes #116. --- test/runner.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/runner.c b/test/runner.c index e50b69a8..48380046 100644 --- a/test/runner.c +++ b/test/runner.c @@ -88,6 +88,13 @@ int run_test(const char* test, int timeout, int benchmark_output) { status = 255; process_count = 0; + /* If it's a helper the user asks for, start it directly. */ + for (task = TASKS; task->main; task++) { + if (task->is_helper && strcmp(test, task->process_name) == 0) { + return task->main(); + } + } + /* Start the helpers first. */ for (task = TASKS; task->main; task++) { if (strcmp(test, task->task_name) != 0) {