Fail CPU test if temps reach THERMAL_FAIL

* The test is allowed to finish as long as temps < THERMAL_LIMIT
* Addresses issue #111
This commit is contained in:
2Shirt 2019-11-18 21:21:42 -07:00
parent d1b37eddc1
commit c3500ee324
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C
2 changed files with 13 additions and 2 deletions

View file

@ -1598,9 +1598,7 @@ def run_mprime_test(state, test):
if isinstance(err, KeyboardInterrupt):
test.update_status('Aborted')
elif isinstance(err, ThermalLimitReachedError):
test.failed = True
test.thermal_abort = True
test.update_status('FAIL')
update_progress_pane(state)
# Restart live monitor
@ -1614,6 +1612,13 @@ def run_mprime_test(state, test):
tmux_kill_pane(state.panes.pop('Prime95', None))
countdown_proc.kill()
# Check max temp
cpu_max_temp = get_cpu_max_temp(test.sensor_data)
if cpu_max_temp >= THERMAL_FAIL:
test.failed = True
test.update_status('FAIL')
update_progress_pane(state)
# Get cooldown temp
run_program(['apple-fans', 'auto'], check=False)
clear_screen()
@ -1711,6 +1716,11 @@ def run_mprime_test(state, test):
' {RED}CPU reached temperature limit of {temp}°C{CLEAR}'.format(
temp=THERMAL_LIMIT,
**COLORS))
elif cpu_max_temp >= THERMAL_FAIL:
test.report.append(
' {RED}CPU reached failing temperature of {temp}°C{CLEAR}'.format(
temp=THERMAL_FAIL,
**COLORS))
# Done
update_progress_pane(state)

View file

@ -104,6 +104,7 @@ KEY_SMART = 'ata_smart_attributes'
# Tests: Prime95
MPRIME_LIMIT = 7 # of minutes to run Prime95
THERMAL_FAIL = 90 # Fail temperature in Celsius
THERMAL_LIMIT = 99 # Abort temperature in Celsius