Skip to content

Commit a092aef

Browse files
authored
Fix binary file matching in test_wasm_opt (#8440)
```py binary = '.wasm' in t ``` can incorrectly also match when the directory name contains it, like, `~/binaryen.wasm_split/...`.
1 parent 68f4da9 commit a092aef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/test/wasm_opt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def test_wasm_opt():
5050
if ('translate-to-fuzz' in t or 'dwarf' in t) and \
5151
shared.skip_if_on_windows('fuzz translation tests'):
5252
continue
53-
binary = '.wasm' in t
53+
binary = t.endswith('.wasm')
5454
base = os.path.basename(t).replace('.wast', '').replace('.wasm', '')
5555
passname = base
5656
passes_file = os.path.join(shared.get_test_dir('passes'), passname + '.passes')

0 commit comments

Comments
 (0)