X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=images%2Fimage-test.c;h=4bf02b3992d742c997c3dc9b37c15a8c33632577;hb=1d92ad2e62c2f12405aac4339af536591f721f6a;hp=043da30a29bc15c68eea31ad6ffb89b7d3c0f3e5;hpb=0b49b79a9debe807b2db229bac32a273e2e961b3;p=libucw.git diff --git a/images/image-test.c b/images/image-test.c index 043da30a..4bf02b39 100644 --- a/images/image-test.c +++ b/images/image-test.c @@ -9,10 +9,10 @@ #undef LOCAL_DEBUG -#include "lib/lib.h" -#include "lib/mempool.h" -#include "lib/fastbuf.h" -#include "lib/threads.h" +#include "ucw/lib.h" +#include "ucw/mempool.h" +#include "ucw/fastbuf.h" +#include "ucw/threads.h" #include "images/images.h" #include "images/color.h" @@ -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