Skip to content

Commit

Permalink
qa_sources: disable execution speed sensitive checks
Browse files Browse the repository at this point in the history
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`
  • Loading branch information
wirew0rm authored and RalphSteinhagen committed Oct 14, 2023
1 parent a6603e7 commit e8e88f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion blocks/basic/test/qa_sources.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const boost::ut::suite TagTests = [] {
expect(eq(static_cast<std::uint32_t>(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<std::uint32_t>(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))
Expand Down

0 comments on commit e8e88f0

Please sign in to comment.