Skip to content

Commit

Permalink
fix #44, Base.include with anonymous module.
Browse files Browse the repository at this point in the history
  • Loading branch information
wookay committed Sep 28, 2021
1 parent 28cdac5 commit 25bda2b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,9 @@ function runner(worker::Int, idx::Int, num_tests::Int, subpath::String, filepath
numbering = string(idx, /, num_tests)
buf = IOBuffer()
io = IOContext(buf, :color => have_color())
modul = Module()
(ts, cumulative_compile_time, elapsed_time) = @jive_testset io numbering subpath " (worker: $worker)" "" begin
include(filepath)
Base.include(modul, filepath)
end
(ts, cumulative_compile_time, elapsed_time, buf)
end
Expand Down Expand Up @@ -464,6 +465,7 @@ function normal_run(dir::String, tests::Vector{String}, start_idx::Int, stop_on_
n_errors = 0
total_cumulative_compile_time = UInt64(0)
total_elapsed_time = UInt64(0)
modul = Module()
for (idx, subpath) in enumerate(tests)
if idx < start_idx
num_tests = length(tests)
Expand All @@ -474,7 +476,7 @@ function normal_run(dir::String, tests::Vector{String}, start_idx::Int, stop_on_
filepath = normpath(dir, slash_to_path_separator(subpath))
numbering = string(idx, /, length(tests))
(ts, cumulative_compile_time, elapsed_time) = @jive_testset io numbering subpath "" "" begin
include(filepath)
Base.include(modul, filepath)
end
total_cumulative_compile_time += cumulative_compile_time
total_elapsed_time += elapsed_time
Expand Down

0 comments on commit 25bda2b

Please sign in to comment.