summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Alex Light <allight@google.com> 2020-01-15 09:54:29 -0800
committer Treehugger Robot <treehugger-gerrit@google.com> 2020-01-17 22:22:38 +0000
commitdaca30367af71c50ed7c39443540c4c8630f4625 (patch)
tree105361a942e9356c0692a994beab1d125a38e7d0
parent7d511d94cdc33df9ede75108b7aa112640635d49 (diff)
Make parallel_run.py print status on single line.
Parallel_run.py would write a ton of status updates as it runs. To make it a bit cleaner have it overwrite the run-count line each time instead. Test: manual Change-Id: I9073810fc7ece9a7d25b4a97a4bd01414ad5efa8
-rwxr-xr-xtools/parallel_run.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/parallel_run.py b/tools/parallel_run.py
index 1e54e2b69a..0fc9ebd28f 100755
--- a/tools/parallel_run.py
+++ b/tools/parallel_run.py
@@ -60,7 +60,7 @@ def main():
fs = ws.not_done
done = list(map(lambda a: a.result(), ws.done))
cnt += len(done)
- print("{} runs".format(cnt))
+ print("\r{} runs".format(cnt), end="")
failed = [d for d,r in done if r != 0]
succ = [d for d,r in done if r == 0]
for f in succ:
@@ -68,7 +68,7 @@ def main():
if len(failed) != 0:
if not found_fail:
found_fail = True
- print("Failed at {} runs".format(cnt))
+ print("\rFailed at {} runs".format(cnt))
if len(failed) != 1:
for f,i in zip(failed, range(len(failed))):
shutil.copyfile(f, args.out+"."+str(i))