Updated Prime95 countdown
This commit is contained in:
parent
21a71d0e67
commit
638796cc44
1 changed files with 11 additions and 3 deletions
|
|
@ -1538,6 +1538,11 @@ def run_mprime_test(state, test):
|
||||||
print_log('Starting Prime95')
|
print_log('Starting Prime95')
|
||||||
test.abort_msg = 'If running too hot, press CTRL+c to abort the test'
|
test.abort_msg = 'If running too hot, press CTRL+c to abort the test'
|
||||||
run_program(['apple-fans', 'max'], check=False)
|
run_program(['apple-fans', 'max'], check=False)
|
||||||
|
run_program('touch /tmp/prime.status'.split(), check=False)
|
||||||
|
with open('/tmp/prime.status', 'w') as f:
|
||||||
|
f.write(f'{COLORS["YELLOW"]}{test.abort_msg}{COLORS["CLEAR"]}\n')
|
||||||
|
clear_screen()
|
||||||
|
countdown_proc = popen_program('tail -f /tmp/prime.status'.split())
|
||||||
tmux_update_pane(
|
tmux_update_pane(
|
||||||
state.panes['Prime95'],
|
state.panes['Prime95'],
|
||||||
command=['hw-diags-prime95', global_vars['TmpDir']],
|
command=['hw-diags-prime95', global_vars['TmpDir']],
|
||||||
|
|
@ -1545,7 +1550,7 @@ def run_mprime_test(state, test):
|
||||||
time_limit = MPRIME_LIMIT * 60
|
time_limit = MPRIME_LIMIT * 60
|
||||||
try:
|
try:
|
||||||
for i in range(time_limit):
|
for i in range(time_limit):
|
||||||
clear_screen()
|
#clear_screen()
|
||||||
sec_left = (time_limit - i) % 60
|
sec_left = (time_limit - i) % 60
|
||||||
min_left = int( (time_limit - i) / 60)
|
min_left = int( (time_limit - i) / 60)
|
||||||
_status_str = 'Running Prime95 ('
|
_status_str = 'Running Prime95 ('
|
||||||
|
|
@ -1557,8 +1562,10 @@ def run_mprime_test(state, test):
|
||||||
sec_left,
|
sec_left,
|
||||||
's' if sec_left != 1 else '')
|
's' if sec_left != 1 else '')
|
||||||
# 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))
|
||||||
|
with open('/tmp/prime.status', 'a') as f:
|
||||||
|
f.write(f'\r{_status_str}')
|
||||||
update_sensor_data(test.sensor_data, THERMAL_LIMIT)
|
update_sensor_data(test.sensor_data, THERMAL_LIMIT)
|
||||||
|
|
||||||
# Wait
|
# Wait
|
||||||
|
|
@ -1583,6 +1590,7 @@ def run_mprime_test(state, test):
|
||||||
run_program(['killall', '-s', 'INT', 'mprime'], check=False)
|
run_program(['killall', '-s', 'INT', 'mprime'], check=False)
|
||||||
sleep(1)
|
sleep(1)
|
||||||
tmux_kill_pane(state.panes.pop('Prime95', None))
|
tmux_kill_pane(state.panes.pop('Prime95', None))
|
||||||
|
countdown_proc.kill()
|
||||||
|
|
||||||
# Get cooldown temp
|
# Get cooldown temp
|
||||||
run_program(['apple-fans', 'auto'], check=False)
|
run_program(['apple-fans', 'auto'], check=False)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue