From 82bc3b804fbb9d8ddc9f67a9ca6b79bfcda855ec Mon Sep 17 00:00:00 2001 From: Pedro Gonnet <gonnet@google.com> Date: Tue, 25 Jul 2017 18:52:45 +0200 Subject: [PATCH] add logging to the threadpool test. --- tests/testThreadpool.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/testThreadpool.c b/tests/testThreadpool.c index aa65d533a2..2a9e98c5ca 100644 --- a/tests/testThreadpool.c +++ b/tests/testThreadpool.c @@ -23,6 +23,7 @@ #include <unistd.h> // Local includes. +#include "../config.h" #include "../src/atomic.h" #include "../src/threadpool.h" @@ -78,6 +79,11 @@ int main(int argc, char *argv[]) { threadpool_map(&tp, map_function_first, data, N, sizeof(int), 2, NULL); } +/* If logging was enabled, dump the log. */ +#ifdef SWIFT_DEBUG_THREADPOOL + threadpool_dump_log(&tp, "threadpool_log.txt", 1); +#endif + /* Be clean */ threadpool_clean(&tp); -- GitLab