Skip to content

Commit 3bd65fa

Browse files
committed
fix(runtest.py): Improve logging for module registration and cleanup processes
1 parent 42879fb commit 3bd65fa

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1511,7 +1511,7 @@ def test_assert_with_exception(form, wast_tempfile, wasm_tempfile, aot_tempfile,
15111511
# - There exists a module in the form of (module $name).
15121512
# - The nearest module in the form of (module), without $name, is the candidate for registration.
15131513
if not name_new in temp_module_table:
1514-
print(f"Module {name_new} is not found in temp_module_table. use the nearest module")
1514+
print(f"Module {name_new} is not found in temp_module_table. use the nearest module {wasm_tempfile}")
15151515

15161516
for_registration = temp_module_table.get(name_new, wasm_tempfile)
15171517
assert os.path.exists(for_registration), f"module {for_registration} is not found"
@@ -1554,7 +1554,7 @@ def test_assert_with_exception(form, wast_tempfile, wasm_tempfile, aot_tempfile,
15541554
ret_code = 0
15551555
finally:
15561556
if not opts.no_cleanup:
1557-
log("Removing tempfiles")
1557+
log(f"Removing tempfiles {wast_tempfile} and {wasm_tempfile}")
15581558
os.remove(wast_tempfile)
15591559
os.remove(wasm_tempfile)
15601560
if test_aot:
@@ -1564,6 +1564,7 @@ def test_assert_with_exception(form, wast_tempfile, wasm_tempfile, aot_tempfile,
15641564
if temp_file_repo:
15651565
for t in temp_file_repo:
15661566
if(len(str(t))!=0 and os.path.exists(t)):
1567+
log(f"Removing others {t}")
15671568
os.remove(t)
15681569

15691570
log("### End testing %s" % opts.test_file.name)

0 commit comments

Comments
 (0)