From 8d48d8f3fb8eb559cb23c75a0793ea570243a2a2 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Wed, 3 Feb 2021 08:34:23 +0000 Subject: [PATCH] ctest: mbedtls: disable spawned server valgrind When the number of parallel mbedtls ctest runs exceeds the number of free cpus in the builder, we get too slow when under valgrind to pass the client tests before they timeout. --- .../http-client/minimal-http-client-multi/CMakeLists.txt | 8 +++++++- .../http-client/minimal-http-client-post/CMakeLists.txt | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/minimal-examples/http-client/minimal-http-client-multi/CMakeLists.txt b/minimal-examples/http-client/minimal-http-client-multi/CMakeLists.txt index 2544b6e94..9122a9e4c 100644 --- a/minimal-examples/http-client/minimal-http-client-multi/CMakeLists.txt +++ b/minimal-examples/http-client/minimal-http-client-multi/CMakeLists.txt @@ -9,10 +9,13 @@ set(SAMP lws-minimal-http-client-multi) set(SRCS minimal-http-client-multi.c) set(requirements 1) +set(MBEDTLS 0) require_lws_config(LWS_ROLE_H1 1 requirements) require_lws_config(LWS_WITH_CLIENT 1 requirements) require_lws_config(LWS_WITH_TLS 1 requirements) +require_lws_config(LWS_WITH_MBEDTLS 1 MBEDTLS) + if (requirements) add_executable(${SAMP} ${SRCS}) @@ -51,7 +54,10 @@ if (WIN32) add_test(NAME st_hcmp_srv COMMAND cmd.exe /c start /b $ -s --port 1${PORT_HCM_SRV}) add_test(NAME ki_hcmp_srv COMMAND taskkill /F /IM $ /T) else() - if (VALGRIND) + # + # mbedtls is too slow to keep up on some targets, when ctest is in parallel + # + if (VALGRIND AND NOT MBEDTLS) add_test(NAME st_hcm_srv COMMAND ${CMAKE_SOURCE_DIR}/scripts/ctest-background.sh hcm_srv ${VALGRIND} --tool=memcheck $ diff --git a/minimal-examples/http-client/minimal-http-client-post/CMakeLists.txt b/minimal-examples/http-client/minimal-http-client-post/CMakeLists.txt index f67ef8ef0..b4e4b74c2 100644 --- a/minimal-examples/http-client/minimal-http-client-post/CMakeLists.txt +++ b/minimal-examples/http-client/minimal-http-client-post/CMakeLists.txt @@ -9,9 +9,12 @@ set(SAMP lws-minimal-http-client-post) set(SRCS minimal-http-client-post.c) set(requirements 1) +set(MBEDTLS 0) require_lws_config(LWS_ROLE_H1 1 requirements) require_lws_config(LWS_WITH_CLIENT 1 requirements) +require_lws_config(LWS_WITH_MBEDTLS 1 MBEDTLS) + if (requirements) add_executable(${SAMP} ${SRCS}) find_program(VALGRIND "valgrind") @@ -45,7 +48,10 @@ if (WIN32) add_test(NAME st_hcp_srv COMMAND cmd.exe /c start /b $ -s --port ${PORT_HCP_SRV}) add_test(NAME ki_hcp_srv COMMAND taskkill /F /IM $ /T) else() - if (VALGRIND) + # + # mbedtls is too slow to keep up on some targets, when ctest is in parallel + # + if (VALGRIND AND NOT MBEDTLS) add_test(NAME st_hcp_srv COMMAND ${CMAKE_SOURCE_DIR}/scripts/ctest-background.sh hcp_srv ${VALGRIND} --tool=memcheck