diff --git a/ancert b/ancert index dd82a498290ff9176866e9feb8737cf4230f75ff..1158e905e89e16f3173702f4ad6862f18915d211 100755 --- a/ancert +++ b/ancert @@ -134,21 +134,30 @@ def main(args): % (device.get_property('DRIVE_FULL_NAME'), device.get_property('DISK_SIZE')))) return 0 + display_categories_lst = ['NVMe', 'Video', 'Network', 'Storage', 'GPU', 'FC', 'CPU'] + c = 0 for comp_inst in selected_components: printed = [] for gname, tasks in comp_inst.next_tasks(): if tasks[0].test.controller not in printed: + if comp_inst.name in display_categories_lst: + print('') + else: + if c == 0 and comp_inst.name not in ['memory']: + print('') if comp_inst.name in ['memory']: - print('\nTested controller: %s' % tasks[0].test.controller.name) + print('Tested controller: %s' % tasks[0].test.controller.name) else: - print('\nTested controller: %s [%s]' % (tasks[0].test.controller.name.strip(), + print('Tested controller: %s [%s]' % (tasks[0].test.controller.name.strip(), tasks[0].test.controller.driver)) printed.append(tasks[0].test.controller) run_task(gname, tasks) + c += 1 total_finished_tasks.extend(tasks) global RESULT if total_finished_tasks: + print('') print('Results Summary:') print('{:<12}{:22}{:<12}{:<52}'.format('Category:', 'Case:', 'Result:', 'Device name:')) print('-'*66) @@ -214,7 +223,7 @@ if '__main__' == __name__: @atexit.register def trigger_before_exit(): - print('-' * 33) + print('-' * 66) pack_log_dir(logdir, args, RESULT) ret = main(args) diff --git a/lib/utils.py b/lib/utils.py index ea5b8a4d45f817dee015daf96f401a82db917fa9..a215a1c04d6745c960fe1fbdb0460ad5f325f1d4 100644 --- a/lib/utils.py +++ b/lib/utils.py @@ -183,7 +183,7 @@ def status_bar(alarm, max_runtime, prefix, data, sleep_time=0.1): msg = msg + ' %s:%s' % (key, blinking(j+i, x, ti)) if i != length: msg = msg + ',' - msg = prefix + msg + '\r' + msg = '\r\x1b[K' + prefix + msg sys.stdout.write(msg) sys.stdout.flush() @@ -193,7 +193,7 @@ def status_bar(alarm, max_runtime, prefix, data, sleep_time=0.1): deploy(i, max_runtime+2) break deploy(i, int(i * sleep_time)) - sys.stdout.write(' '*200+'\r') + sys.stdout.write('\r\x1b[K') sys.stdout.flush()