Skip to content

Commit 7c6fc70

Browse files
authored
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.
1 parent 68fccc4 commit 7c6fc70

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

tests/wamr-test-suites/spec-test-script/runtest.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1158,6 +1158,9 @@ def run_wasm_with_repl(wasm_tempfile, aot_tempfile, opts, r):
11581158
tmpfile = aot_tempfile if test_aot else wasm_tempfile
11591159
log("Starting interpreter for module '%s'" % tmpfile)
11601160

1161+
if opts.qemu:
1162+
tmpfile = f"/tmp/{os.path.basename(tmpfile)}"
1163+
11611164
cmd_iwasm = [opts.interpreter, "--heap-size=0", "-v=5" if opts.verbose else "-v=0", "--repl", tmpfile]
11621165

11631166
if opts.multi_module:

0 commit comments

Comments
 (0)