summaryrefslogtreecommitdiff
path: root/scripts/test/s2wasm.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/test/s2wasm.py')
-rwxr-xr-xscripts/test/s2wasm.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/scripts/test/s2wasm.py b/scripts/test/s2wasm.py
index b8027f668..405ed5fdf 100755
--- a/scripts/test/s2wasm.py
+++ b/scripts/test/s2wasm.py
@@ -119,7 +119,15 @@ def test_linker():
for name, extra in expected_funcs:
space = ' ' if extra else ''
fail_if_not_contained(output, '(export "{0}" (func ${0}))'.format(name))
- fail_if_not_contained(output, '(func ${0}'.format(name + space + extra))
+ for line in output.split('\n'):
+ if '(func ${0}'.format(name + space) in line:
+ # we found the relevant line for the function definition. remove
+ # a (; X ;) comment with its index
+ start = line.find('(; ')
+ if start >= 0:
+ end = line.find(' ;)')
+ line = line[:start] + line[end + 4:]
+ fail_if_not_contained(line, '(func ${0}'.format(name + space + extra))
if __name__ == '__main__':