CI: reduce output from helper scripts (#48145)
This commit is contained in:
parent
f04ea573fa
commit
f211e2f9c4
@ -6,6 +6,8 @@
|
||||
|
||||
import os
|
||||
|
||||
from llnl.util.tty import tty
|
||||
|
||||
|
||||
def find_logs(prefix, filename):
|
||||
for root, _, files in os.walk(prefix):
|
||||
@ -37,14 +39,12 @@ def find_logs(prefix, filename):
|
||||
|
||||
# Look in the list of prefixes for logs
|
||||
for prefix in prefixes:
|
||||
print(f"Walking {prefix}")
|
||||
logs = [log for log in find_logs(prefix, args.log)]
|
||||
print(f" * found {len(logs)} logs")
|
||||
for log in logs:
|
||||
print(f" * appending data for {log}")
|
||||
tty.debug(f"appending data for {log}")
|
||||
with open(log, encoding="utf-8") as fd:
|
||||
data.append(json.load(fd))
|
||||
|
||||
print(f"Writing {args.output_file}")
|
||||
tty.info(f"Writing {len(data)} records to {args.output_file}")
|
||||
with open(args.output_file, "w", encoding="utf-8") as fd:
|
||||
json.dump(data, fd)
|
||||
|
Loading…
Reference in New Issue
Block a user