Skip to content

Commit e637cd0

Browse files
committed
Eval the initialization code separately.
If we put it in a block of expressions, it can't define things that need to happen at top level (e.g. macros).
1 parent b229504 commit e637cd0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ParallelTestRunner.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,10 @@ function runtest(::Type{TestRecord}, f, name, init_code)
146146
wait(@spawnat 1 print_testworker_started(name, id))
147147
end
148148

149+
Core.eval(mod, init_code)
149150
data = @eval mod begin
150151
GC.gc(true)
151152
Random.seed!(1)
152-
$init_code
153153

154154
res = @timed @testset $name begin
155155
$f

0 commit comments

Comments
 (0)