From e8e88f0c09ce617d308eb06f03cc3d478e6fd90f Mon Sep 17 00:00:00 2001 From: Alexander Krimm Date: Fri, 13 Oct 2023 18:33:46 +0200 Subject: [PATCH] qa_sources: disable execution speed sensitive checks Disable certain sensitive checks for the processing rate when running the instrumented build. This is done by introducing an Environment variable which is used to conditionally skip them: `DISABLE_SENSITIVE_CHECKS=1 qa_sources` --- blocks/basic/test/qa_sources.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blocks/basic/test/qa_sources.cpp b/blocks/basic/test/qa_sources.cpp index ddf251ecc..2b76d6e64 100644 --- a/blocks/basic/test/qa_sources.cpp +++ b/blocks/basic/test/qa_sources.cpp @@ -55,7 +55,7 @@ const boost::ut::suite TagTests = [] { expect(eq(static_cast(sink1.n_samples_produced), n_samples)) << fmt::format("sink1 did not consume enough input samples ({} vs. {})", sink1.n_samples_produced, n_samples); expect(eq(static_cast(sink2.n_samples_produced), n_samples)) << fmt::format("sink2 did not consume enough input samples ({} vs. {})", sink2.n_samples_produced, n_samples); - if (std::getenv("DISABLE_SENSITIVE_TESTS") != nullptr) { + if (std::getenv("DISABLE_SENSITIVE_TESTS") == nullptr) { expect(approx(sink1.effective_sample_rate(), sample_rate, 500.f)) << fmt::format("sink1: effective sample rate {} vs {} +- {} does not match", sink1.effective_sample_rate(), sample_rate, 500.f); expect(approx(sink2.effective_sample_rate(), sample_rate, 500.f))