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); }