Skip to content

Commit bed4a48

Browse files
authored
Fix lock file error with test/runner and EMCC_DEBUG mode. (emscripten-core#26110)
`cleanup_emscripten_temp()` was run at the beginning of tests and caused the `emscripten.lock` file that was created earlier to be removed. Then when test was finished it attempted to delete that lock file again.
1 parent ca1c316 commit bed4a48

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/runner.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -711,8 +711,10 @@ def set_env(name, option_value):
711711

712712
check_js_engines()
713713

714-
# Remove any old test files before starting the run
715-
cleanup_emscripten_temp()
714+
# Remove any old test files before starting the run. Skip cleanup when we're running in debug mode
715+
# where we want to preserve any files created (e.g. emscripten.lock from shared.py).
716+
if not (shared.DEBUG or common.EMTEST_SAVE_DIR):
717+
cleanup_emscripten_temp()
716718
utils.delete_file(common.flaky_tests_log_filename)
717719

718720
browser_common.init(options.force_browser_process_termination)

0 commit comments

Comments
 (0)