summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/update_lit_checks.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/scripts/update_lit_checks.py b/scripts/update_lit_checks.py
index ef1dc6aae..79af92ab9 100755
--- a/scripts/update_lit_checks.py
+++ b/scripts/update_lit_checks.py
@@ -39,7 +39,11 @@ MODULE_RE = re.compile(r'^\(module.*$', re.MULTILINE)
ALL_ITEMS = '|'.join(['type', 'import', 'global', 'memory', 'data', 'table',
'elem', 'tag', 'export', 'start', 'func'])
-ITEM_NAME = r'\$?[^\s()]*|"[^\s()]*"'
+
+# Regular names as well as the "declare" in (elem declare ... to get declarative
+# segments included in the output.
+ITEM_NAME = r'\$[^\s()]*|"[^\s()]*"|declare'
+
# FIXME: This does not handle nested string contents. For example,
# (data (i32.const 10) "hello(")
# will look unterminated, due to the '(' inside the string. As a result, the
@@ -152,9 +156,9 @@ def parse_output_fuzz_exec(text):
for line in text.split('\n'):
func = FUZZ_EXEC_FUNC.match(line)
if func:
- # Add quotes around the name because that is how it will be parsed
+ # Add a '$' prefix to the name because that is how it will be parsed
# in the input.
- name = f'"{func.group("name")}"'
+ name = '$' + func.group("name")
items.append((('func', name), [line]))
elif line.startswith('[host limit'):
# Skip mentions of host limits that we hit. This can happen even