From deeb5df74afa03002380c01a2aea41d9dce2d753 Mon Sep 17 00:00:00 2001 From: Avik Pal Date: Mon, 17 Mar 2025 12:02:22 -0400 Subject: [PATCH 1/2] fix: windows resource busy/locked --- src/ReTestItems.jl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ReTestItems.jl b/src/ReTestItems.jl index 82d67792..f9eb49fd 100644 --- a/src/ReTestItems.jl +++ b/src/ReTestItems.jl @@ -461,7 +461,12 @@ function _runtests_in_current_env( Test.TESTSET_PRINT_ENABLE[] = true # Cleanup test setup logs foreach(Iterators.filter(endswith(".log"), readdir(RETESTITEMS_TEMP_FOLDER[], join=true))) do logfile - rm(logfile; force=true) # `force` to ignore error if file already cleaned up + try + # See https://github.com/JuliaTesting/ReTestItems.jl/issues/124 + rm(logfile; force=true) # `force` to ignore error if file already cleaned up + catch err + @warn "Error while attempting to remove $(logfile)" err + end end end return nothing From b34381bac24a0af6c5479e4d6d8d65c8efcd9f47 Mon Sep 17 00:00:00 2001 From: Avik Pal Date: Mon, 17 Mar 2025 13:54:16 -0400 Subject: [PATCH 2/2] fix: log as debug --- src/ReTestItems.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ReTestItems.jl b/src/ReTestItems.jl index f9eb49fd..3f35568d 100644 --- a/src/ReTestItems.jl +++ b/src/ReTestItems.jl @@ -465,7 +465,7 @@ function _runtests_in_current_env( # See https://github.com/JuliaTesting/ReTestItems.jl/issues/124 rm(logfile; force=true) # `force` to ignore error if file already cleaned up catch err - @warn "Error while attempting to remove $(logfile)" err + @debug "Error while attempting to remove $(logfile)" err end end end