From c315d128b44495905f5fac709afca97671427e04 Mon Sep 17 00:00:00 2001 From: Adrian Villin Date: Wed, 7 May 2025 11:52:21 +0200 Subject: [PATCH] hs-test: don't assert iperf results on GCOV builds Type: test Change-Id: Idd332b5ad13de33b155906876f177941c01cd4bd Signed-off-by: Adrian Villin --- extras/hs-test/infra/hst_suite.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/extras/hs-test/infra/hst_suite.go b/extras/hs-test/infra/hst_suite.go index 84e8089b0bf..9a4d8f809aa 100644 --- a/extras/hs-test/infra/hst_suite.go +++ b/extras/hs-test/infra/hst_suite.go @@ -412,8 +412,13 @@ func (s *HstSuite) AssertChannelClosed(timeout time.Duration, channel chan error EventuallyWithOffset(2, channel).WithTimeout(timeout).Should(BeClosed()) } -// Pass the parsed result struct and the minimum amount of data transferred in MB +// Pass the parsed result struct and the minimum amount of data transferred in MB. +// Won't do anything when testing a coverage build. func (s *HstSuite) AssertIperfMinTransfer(result IPerfResult, minTransferred int) { + if *IsCoverage { + s.Log("Coverage build; not asserting") + return + } if result.Start.Details.Protocol == "TCP" { s.AssertGreaterThan(result.End.TcpReceived.MBytes, minTransferred) } else { -- 2.16.6