pmb.helpers.frontend: Also clear testsuite log when running log -c
Reviewed-by: Oliver Smith <ollieparanoid@postmarketos.org> Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C20230603102910.164433-1-newbyte@postmarketos.org%3E
This commit is contained in:
parent
d31313f7dc
commit
09870a46a0
|
@ -531,14 +531,16 @@ def work_migrate(args):
|
|||
|
||||
|
||||
def log(args):
|
||||
log_testsuite = f"{args.work}/log_testsuite.txt"
|
||||
|
||||
if args.clear_log:
|
||||
pmb.helpers.run.user(args, ["truncate", "-s", "0", args.log])
|
||||
pmb.helpers.run.user(args, ["truncate", "-s", "0", log_testsuite])
|
||||
|
||||
cmd = ["tail", "-n", args.lines, "-F"]
|
||||
|
||||
# Follow the testsuite's log file too if it exists. It will be created when
|
||||
# starting a test case that writes to it (git -C test grep log_testsuite).
|
||||
log_testsuite = f"{args.work}/log_testsuite.txt"
|
||||
if os.path.exists(log_testsuite):
|
||||
cmd += [log_testsuite]
|
||||
|
||||
|
|
Loading…
Reference in New Issue