Clear screen before all diag functions

This commit is contained in:
2Shirt 2019-12-02 17:54:48 -07:00
parent aa3b69f6fa
commit 7796189d14
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C

View file

@ -287,7 +287,6 @@ def audio_test():
def audio_test_linux(): def audio_test_linux():
"""Run an audio test using amixer and speaker-test.""" """Run an audio test using amixer and speaker-test."""
LOG.info('Audio Test') LOG.info('Audio Test')
std.clear_screen()
# Set volume # Set volume
for source in ('Master', 'PCM'): for source in ('Master', 'PCM'):
@ -446,7 +445,6 @@ def cpu_mprime_test(state, test_objects):
state.layout['Current'] = {'height': 3, 'Check': True} state.layout['Current'] = {'height': 3, 'Check': True}
# Get idle temps # Get idle temps
std.clear_screen()
std.print_standard('Saving idle temps...') std.print_standard('Saving idle temps...')
sensors.save_average_temps(temp_label='Idle', seconds=5) sensors.save_average_temps(temp_label='Idle', seconds=5)
@ -474,7 +472,6 @@ def cpu_mprime_test(state, test_objects):
set_apple_fan_speed('auto') set_apple_fan_speed('auto')
# Get cooldown temp # Get cooldown temp
std.clear_screen()
std.print_standard('Letting CPU cooldown...') std.print_standard('Letting CPU cooldown...')
std.sleep(5) std.sleep(5)
std.print_standard('Saving cooldown temps...') std.print_standard('Saving cooldown temps...')
@ -604,7 +601,6 @@ def keyboard_test():
"""Test keyboard using xev.""" """Test keyboard using xev."""
LOG.info('Keyboard Test (xev)') LOG.info('Keyboard Test (xev)')
cmd = ['xev', '-event', 'keyboard'] cmd = ['xev', '-event', 'keyboard']
std.clear_screen()
exe.run_program(cmd, check=False, pipe=False) exe.run_program(cmd, check=False, pipe=False)
@ -625,7 +621,6 @@ def main():
# Quick Mode # Quick Mode
if args['--quick']: if args['--quick']:
std.clear_screen()
run_diags(state, menu, quick_mode=True) run_diags(state, menu, quick_mode=True)
return return
@ -680,7 +675,6 @@ def main():
def network_test(): def network_test():
"""Run network tests.""" """Run network tests."""
LOG.info('Network Test') LOG.info('Network Test')
std.clear_screen()
try_and_print = std.TryAndPrint() try_and_print = std.TryAndPrint()
result = try_and_print.run( result = try_and_print.run(
'Network connection...', net.connected_to_private_network, msg_good='OK') 'Network connection...', net.connected_to_private_network, msg_good='OK')
@ -746,6 +740,7 @@ def run_diags(state, menu, quick_mode=False):
# Run test(s) # Run test(s)
function = details['Function'] function = details['Function']
try: try:
std.clear_screen()
function(state, details['Objects']) function(state, details['Objects'])
except std.GenericAbort: except std.GenericAbort:
aborted = True aborted = True