Added thermal limit logic to Prime95 test
This commit is contained in:
parent
3c35a75c92
commit
a28a754be1
2 changed files with 20 additions and 5 deletions
|
|
@ -1262,6 +1262,7 @@ def run_mprime_test(state, test):
|
||||||
test.update_status()
|
test.update_status()
|
||||||
update_progress_pane(state)
|
update_progress_pane(state)
|
||||||
test.sensor_data = get_sensor_data()
|
test.sensor_data = get_sensor_data()
|
||||||
|
test.thermal_abort = False
|
||||||
|
|
||||||
# Update tmux layout
|
# Update tmux layout
|
||||||
tmux_update_pane(
|
tmux_update_pane(
|
||||||
|
|
@ -1303,6 +1304,7 @@ def run_mprime_test(state, test):
|
||||||
command=['hw-diags-prime95', global_vars['TmpDir']],
|
command=['hw-diags-prime95', global_vars['TmpDir']],
|
||||||
working_dir=global_vars['TmpDir'])
|
working_dir=global_vars['TmpDir'])
|
||||||
time_limit = int(MPRIME_LIMIT) * 60
|
time_limit = int(MPRIME_LIMIT) * 60
|
||||||
|
thermal_limit = int(THERMAL_LIMIT)
|
||||||
try:
|
try:
|
||||||
for i in range(time_limit):
|
for i in range(time_limit):
|
||||||
clear_screen()
|
clear_screen()
|
||||||
|
|
@ -1319,15 +1321,19 @@ def run_mprime_test(state, test):
|
||||||
# Not using print wrappers to avoid flooding the log
|
# Not using print wrappers to avoid flooding the log
|
||||||
print(_status_str)
|
print(_status_str)
|
||||||
print('{YELLOW}{msg}{CLEAR}'.format(msg=test.abort_msg, **COLORS))
|
print('{YELLOW}{msg}{CLEAR}'.format(msg=test.abort_msg, **COLORS))
|
||||||
update_sensor_data(test.sensor_data)
|
update_sensor_data(test.sensor_data, thermal_limit)
|
||||||
|
|
||||||
# Wait
|
# Wait
|
||||||
sleep(1)
|
sleep(1)
|
||||||
except KeyboardInterrupt:
|
except (KeyboardInterrupt, ThermalError) as err:
|
||||||
# Catch CTRL+C
|
# CTRL+c pressed or thermal threshold reached
|
||||||
test.aborted = True
|
test.aborted = True
|
||||||
test.update_status('Aborted')
|
if isinstance(err, KeyboardInterrupt):
|
||||||
print_warning('\nAborted.')
|
test.update_status('Aborted')
|
||||||
|
elif isinstance(err, ThermalError):
|
||||||
|
test.failed = True
|
||||||
|
test.thermal_abort = True
|
||||||
|
test.update_status('NS')
|
||||||
update_progress_pane(state)
|
update_progress_pane(state)
|
||||||
|
|
||||||
# Restart live monitor
|
# Restart live monitor
|
||||||
|
|
@ -1428,6 +1434,14 @@ def run_mprime_test(state, test):
|
||||||
test.sensor_data, 'Idle', 'Max', 'Cooldown', core_only=True):
|
test.sensor_data, 'Idle', 'Max', 'Cooldown', core_only=True):
|
||||||
test.report.append(' {}'.format(line))
|
test.report.append(' {}'.format(line))
|
||||||
|
|
||||||
|
# Add abort message(s)
|
||||||
|
if test.aborted:
|
||||||
|
test.report.append(
|
||||||
|
' {YELLOW}Aborted{CLEAR}'.format(**COLORS))
|
||||||
|
if test.thermal_abort:
|
||||||
|
test.report.append(
|
||||||
|
' {RED}CPU temps exceeded threshold{CLEAR}'.format(**COLORS))
|
||||||
|
|
||||||
# Done
|
# Done
|
||||||
update_progress_pane(state)
|
update_progress_pane(state)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ KIT_NAME_SHORT='WK'
|
||||||
SUPPORT_MESSAGE='Please let 2Shirt know by opening an issue on GitHub'
|
SUPPORT_MESSAGE='Please let 2Shirt know by opening an issue on GitHub'
|
||||||
# Live Linux
|
# Live Linux
|
||||||
MPRIME_LIMIT='7' # of minutes to run Prime95 during hw-diags
|
MPRIME_LIMIT='7' # of minutes to run Prime95 during hw-diags
|
||||||
|
THERMAL_LIMIT='95' # Prime95 abort temperature in Celsius
|
||||||
ROOT_PASSWORD='Abracadabra'
|
ROOT_PASSWORD='Abracadabra'
|
||||||
TECH_PASSWORD='Abracadabra'
|
TECH_PASSWORD='Abracadabra'
|
||||||
# Server IP addresses
|
# Server IP addresses
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue