From 9860a5546b7b19c80c7e9cf2c0d4b6fdd30b358c Mon Sep 17 00:00:00 2001 From: Stadnik Andrey Date: Mon, 9 Dec 2024 18:48:56 +0300 Subject: [PATCH] Reduced tests --- CMakeLists.txt | 1 - src/test.cpp | 13 ++++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 87a3242..b8ddcee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,7 +18,6 @@ target_compile_options(ringbuffer_test PRIVATE "$<$:${_COMPILE_DEB target_compile_options(ringbuffer_test PRIVATE "$<$:${COMPILE_RELEASE_OPTIONS}>") - enable_testing() add_test(ringbuffer_test ringbuffer_test) diff --git a/src/test.cpp b/src/test.cpp index 2c17127..d623df8 100644 --- a/src/test.cpp +++ b/src/test.cpp @@ -127,12 +127,15 @@ int main(int argc, char* argv[]) { int consumer_cpu = -1; if (argc > 1) { producer_cpu = std::atoi(argv[1]); - if (argc > 2) { - consumer_cpu = std::atoi(argv[2]); - } } - int i = 0; - while (++i < 100) { + + if (argc > 2) { + consumer_cpu = std::atoi(argv[2]); + } + + int i = 10; + + while (--i >= 0) { test(producer_cpu, consumer_cpu); }