From 134714f7d8669e93a701bda9e95f8628df94f747 Mon Sep 17 00:00:00 2001 From: Santiago Vila Date: Mon, 11 Nov 2024 20:15:00 +0100 Subject: [PATCH] Skip parallel tests on machines having a single CPU Otherwise this is what happens: The following tests FAILED: 5762 - contrib/parallel/buffer_queue_parallel_test::buffer_queue.spmc_sum (Failed) 5763 - contrib/parallel/buffer_queue_parallel_test::buffer_queue.mpsc_sum (Failed) 5764 - contrib/parallel/buffer_queue_parallel_test::buffer_queue.mpmc_sum (Failed) 5767 - contrib/parallel/buffer_queue_parallel_test::buffer_queue.spmc_dynamicsize (Failed) 5768 - contrib/parallel/buffer_queue_parallel_test::buffer_queue.spmc_fixedsize (Failed) 5769 - contrib/parallel/buffer_queue_parallel_test::buffer_queue.mpsc_dynamicsize (Failed) 5770 - contrib/parallel/buffer_queue_parallel_test::buffer_queue.mpsc_fixedsize (Failed) 5771 - contrib/parallel/buffer_queue_parallel_test::buffer_queue.mpmc_dynamicsize (Failed) 5772 - contrib/parallel/buffer_queue_parallel_test::buffer_queue.mpmc_fixedsize (Failed) Errors while running CTest --- test/unit/contrib/parallel/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/unit/contrib/parallel/CMakeLists.txt b/test/unit/contrib/parallel/CMakeLists.txt index c642e8e800..da289de6b2 100644 --- a/test/unit/contrib/parallel/CMakeLists.txt +++ b/test/unit/contrib/parallel/CMakeLists.txt @@ -2,5 +2,9 @@ # SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik # SPDX-License-Identifier: CC0-1.0 -seqan3_test (buffer_queue_parallel_test.cpp) +include(ProcessorCount) +ProcessorCount(NPROC) +if(NPROC GREATER 1) + seqan3_test (buffer_queue_parallel_test.cpp) +endif() seqan3_test (buffer_queue_test.cpp)