spec-test-script/runtest.py: Don't assume the tmp dir path (#3632)

The current coding assumes the tmp file is created in /tmp.
However,

* It's somewhere under /var/folders/... by default on macOS.

* A user can set TMPDIR.
This commit is contained in:
YAMAMOTO Takashi 2024-07-18 11:05:24 +09:00 committed by GitHub
parent 68fccc4bc5
commit 7c6fc70aea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1158,6 +1158,9 @@ def run_wasm_with_repl(wasm_tempfile, aot_tempfile, opts, r):
tmpfile = aot_tempfile if test_aot else wasm_tempfile
log("Starting interpreter for module '%s'" % tmpfile)
if opts.qemu:
tmpfile = f"/tmp/{os.path.basename(tmpfile)}"
cmd_iwasm = [opts.interpreter, "--heap-size=0", "-v=5" if opts.verbose else "-v=0", "--repl", tmpfile]
if opts.multi_module: