Skip to content

Commit

Permalink
spec-test-script/runtest.py: Don't assume the tmp dir path (bytecodea…
Browse files Browse the repository at this point in the history
…lliance#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.
  • Loading branch information
yamt authored Jul 18, 2024
1 parent 68fccc4 commit 7c6fc70
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/wamr-test-suites/spec-test-script/runtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 7c6fc70

Please sign in to comment.