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
diff --git a/tools/parallel_run.py b/tools/parallel_run.py
index 1e54e2b..0fc9ebd 100755
--- a/tools/parallel_run.py
+++ b/tools/parallel_run.py
@@ -60,7 +60,7 @@
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 @@
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))