summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Makoto Onuki <omakoto@google.com> 2024-12-09 09:42:47 -0800
committer Makoto Onuki <omakoto@google.com> 2024-12-09 09:45:09 -0800
commit91928aa515fd5db92f30c8431e032736177e1c25 (patch)
tree3b1e75f886c2a56e27c949dc8e387281c4ae0e48
parent340592ddbd66874539a0952eda1ecc3d5a30b1e0 (diff)
Slightly tweak the "extract" script.
Flag: EXEMPT host test change only Bug: 292141694 Test: Manual test -- run the script and check the output Change-Id: I2cf8c00bcc4d9e347a2f5c4f24fb0e3ba1e1ee93
-rwxr-xr-xravenwood/scripts/extract-last-soong-commands.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/ravenwood/scripts/extract-last-soong-commands.py b/ravenwood/scripts/extract-last-soong-commands.py
index bdc1de0c44f4..c08d4aa799a5 100755
--- a/ravenwood/scripts/extract-last-soong-commands.py
+++ b/ravenwood/scripts/extract-last-soong-commands.py
@@ -48,6 +48,7 @@ def main(args):
with open(outfile, "w") as out:
out.write(HEADER)
+ count = 0
with gzip.open(log) as f:
for line in f:
s = line.decode("utf-8")
@@ -63,7 +64,8 @@ def main(args):
if m:
command = m.groups()[0]
- out.write('#========\n')
+ count += 1
+ out.write(f'### Command {count} ========\n')
# Show the full command line before executing it.
out.write('#echo ' + shlex.quote(command) + '\n')