From ab55abb0f8d9bb645a5a60d491534b39724db5da Mon Sep 17 00:00:00 2001 From: Ali Mohammad Pur Date: Fri, 11 Mar 2022 12:01:03 +0330 Subject: [PATCH] Meta: Enable all wasm extensions when building test suite ...and let LibWasm do the validation instead of removing the test when a module is invalid. Also, one of the tests has an integer literal starting with zero, so account for this to make it not fail :^) --- Meta/generate-libwasm-spec-test.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Meta/generate-libwasm-spec-test.py b/Meta/generate-libwasm-spec-test.py index a26c52fe55d..a08bd045475 100644 --- a/Meta/generate-libwasm-spec-test.py +++ b/Meta/generate-libwasm-spec-test.py @@ -274,6 +274,10 @@ def genarg(spec): return str(struct.unpack('>q', struct.pack('>Q', int(x, 16)))[0]) + 'n' if spec['type'] == 'i64': # Make a bigint instead, since `double' cannot fit all i64 values. + if x.startswith('0'): + x = x.lstrip('0') + if x == '': + x = '0' return x + 'n' return x @@ -434,7 +438,7 @@ def compile_wasm_source(mod, outpath): with NamedTemporaryFile("w+") as temp: temp.write(mod[1]) temp.flush() - rc = call(["wat2wasm", temp.name, "-o", outpath]) + rc = call(["wat2wasm", "--enable-all", "--no-check", temp.name, "-o", outpath]) return rc == 0 return False