Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/ParallelTestRunner.jl
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,10 @@ function runtest(::Type{TestRecord}, f, name, init_code)
wait(@spawnat 1 print_testworker_started(name, id))
end

Core.eval(mod, init_code)
data = @eval mod begin
GC.gc(true)
Random.seed!(1)
$init_code

res = @timed @testset $name begin
$f
Expand Down
1 change: 1 addition & 0 deletions test/basic.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@test true
1 change: 0 additions & 1 deletion test/init.jl

This file was deleted.

11 changes: 8 additions & 3 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,21 @@ using ParallelTestRunner

pushfirst!(ARGS, "--verbose")

runtests(ARGS)

# custom tests, and initialization code
init_code = quote
using Test
should_be_defined() = true
end

runtests(ARGS; init_code)

macro should_also_be_defined()
return :(true)
end
end
custom_tests = Dict(
"custom" => quote
@test should_be_defined()
@test @should_also_be_defined()
end
)
runtests(ARGS; init_code, custom_tests)
Loading