summaryrefslogtreecommitdiff
path: root/Meta/generate-libwasm-spec-test.py
diff options
context:
space:
mode:
authorAli Mohammad Pur <ali.mpfard@gmail.com>2021-06-04 03:22:33 +0430
committerAli Mohammad Pur <Ali.mpfard@gmail.com>2021-06-04 16:07:42 +0430
commitd7ba15371b8962de71ec3d6271cb9d6ca061263d (patch)
tree1354921ebca11953429b74eb63ea0a0c903ae475 /Meta/generate-libwasm-spec-test.py
parent977addf76d181ec4c5369930fb7313dc706d27cd (diff)
downloadserenity-d7ba15371b8962de71ec3d6271cb9d6ca061263d.zip
Meta: Don't make wasm tests pass when they cannot read a module
Instead, just let them be treated as failing their respective test.
Diffstat (limited to 'Meta/generate-libwasm-spec-test.py')
-rw-r--r--Meta/generate-libwasm-spec-test.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/Meta/generate-libwasm-spec-test.py b/Meta/generate-libwasm-spec-test.py
index 4c414f910c..1d3399b424 100644
--- a/Meta/generate-libwasm-spec-test.py
+++ b/Meta/generate-libwasm-spec-test.py
@@ -234,10 +234,7 @@ def gentest(entry, main_name):
def gen_parse_module(name):
return (
- f'let content;\n '
- f'try {{\n '
- f'content = readBinaryWasmFile("Fixtures/SpecTests/{name}.wasm");\n '
- f'}} catch {{ read_okay = false; }}\n '
+ f'let content = readBinaryWasmFile("Fixtures/SpecTests/{name}.wasm");\n '
f'const module = parseWebAssemblyModule(content)\n '
)
@@ -260,12 +257,10 @@ def main():
continue
sep = ""
- print(f'''{{
-let readOkay = true;
+ print(f'''describe({json.dumps(testname)}, () => {{
{gen_parse_module(testname)}
-if (readOkay) {{
{sep.join(gentest(x, testname) for x in description["tests"])}
-}}}}
+}});
''')