Skip to content

Commit

Permalink
custom-fan-curve.robot: Fail only on multiple invalid values in row
Browse files Browse the repository at this point in the history
Signed-off-by: Filip Gołaś <[email protected]>
  • Loading branch information
philipandag committed Jan 13, 2025
1 parent 4f9972b commit d24b60c
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions dasharo-performance/custom-fan-curve.robot
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d24b60c

Please sign in to comment.