From 23806d7b1f69cea315e7e76cdac81f0ade4f2764 Mon Sep 17 00:00:00 2001 From: Volodymyr Shymanskyy Date: Fri, 29 May 2020 18:28:44 +0300 Subject: [PATCH] Improve remote testing (use :load-hex to load spec test binaries) --- test/run-spec-test.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/test/run-spec-test.py b/test/run-spec-test.py index 84a1313..66c4b71 100755 --- a/test/run-spec-test.py +++ b/test/run-spec-test.py @@ -228,12 +228,10 @@ class Wasm3(): return self._run_cmd(f":version\n") def load(self, fn): - # WAVM mounts root, so it expects an absolute path - if "wavm run" in self.exe: - fn = "/" + fn - self.loaded = None - res = self._run_cmd(f":load {fn}\n") + with open(fn,"rb") as f: + wasm = f.read() + res = self._run_cmd(f":load-hex {len(wasm)}\n{wasm.hex()}\n") self.loaded = fn return res