From 36368a8c72edfd09f250204b9f2c85285ec51de0 Mon Sep 17 00:00:00 2001 From: Pavel Charvat Date: Mon, 29 Oct 2007 15:03:27 +0100 Subject: [PATCH] Perform threaded imagelib tests only with CONFIG_UCW_THREADS. --- images/image-test.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/images/image-test.c b/images/image-test.c index 043da30a..889e85e5 100644 --- a/images/image-test.c +++ b/images/image-test.c @@ -93,6 +93,8 @@ test_image_iface(void) mp_delete(pool); } +#ifdef CONFIG_UCW_THREADS + #define TEST_THREADS_COUNT 4 static void * @@ -187,9 +189,12 @@ test_threads_thread(void *param UNUSED) return NULL; } +#endif + static void test_threads(void) { +#ifdef CONFIG_UCW_THREADS pthread_t threads[TEST_THREADS_COUNT - 1]; pthread_attr_t attr; if (pthread_attr_init(&attr) < 0 || @@ -204,6 +209,9 @@ test_threads(void) for (uns i = 0; i < TEST_THREADS_COUNT - 1; i++) if (pthread_join(threads[i], NULL) < 0) die("Cannot join thread: %m"); +#else + msg(L_WARN, "Disabled CONFIG_UCW_THREADS, threaded tests skipped"); +#endif } int -- 2.39.2