From d24b60c4eb813ec6493b586cc58ca0969e84dbf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Go=C5=82a=C5=9B?= Date: Mon, 13 Jan 2025 15:26:25 +0100 Subject: [PATCH] custom-fan-curve.robot: Fail only on multiple invalid values in row MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Filip Gołaś --- dasharo-performance/custom-fan-curve.robot | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/dasharo-performance/custom-fan-curve.robot b/dasharo-performance/custom-fan-curve.robot index 5a71b0054..60ffdef04 100644 --- a/dasharo-performance/custom-fan-curve.robot +++ b/dasharo-performance/custom-fan-curve.robot @@ -75,20 +75,31 @@ Perform Custom Fan Curve Test Stress Test ${CUSTOM_FAN_CURVE_TEST_DURATION}m ${timer}= Convert To Integer 0 Sleep 5s - ${pass}= Set Variable ${TRUE} + ${result}= Set Variable ${TRUE} + ${fails_in_a_row}= Set Variable 0 + FOR ${i} IN RANGE (${CUSTOM_FAN_CURVE_TEST_DURATION} / ${CUSTOM_FAN_CURVE_MEASURE_INTERVAL}) Log To Console \n ---------------------------------------------------------------- Log To Console ${timer} min. - ${result}= Verify Fan Speeds ${profile} - ${pass}= Evaluate ${pass} and ${result} + + ${new_result}= Verify Fan Speeds ${profile} + IF not ${result} and not ${new_result} + ${fails_in_a_row}= Evaluate ${fails_in_a_row}+1 + IF ${fails_in_a_row} > 1 + Fail Too many invalid fan speeds in a row + END + ELSE + ${fails_in_a_row}= Set Variable 0 + END + Sleep ${CUSTOM_FAN_CURVE_MEASURE_INTERVAL}m ${timer}= Evaluate ${timer} + ${CUSTOM_FAN_CURVE_MEASURE_INTERVAL} END - IF not ${pass} + + IF not ${result} Log Invalid fan speeds detected. Needs manual verification WARN Log To Console Invalid fan speeds detected. Needs manual verification WARN END - Should Be True ${pass} Verify Fan Speeds [Documentation] Measures PWM/RPM and compares to target values depending