Skip to content

Commit b3573a9

Browse files
committed
Adapt to init_worker_code
1 parent efdc7cf commit b3573a9

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

test/runtests.jl

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1+
using Pkg
2+
Pkg.add(url="https://github.com/christiangnrd/ParallelTestRunner.jl", rev="total_time")
3+
14
using ParallelTestRunner: runtests, parse_args
25
import GPUArrays
36

47
include("testsuite.jl")
58

6-
const init_code = quote
9+
# const init_code = quote
10+
const init_worker_code = quote
711
using Test, JLArrays, SparseArrays
812

913
include("testsuite.jl")
@@ -18,11 +22,17 @@ const init_code = quote
1822
end
1923
end
2024

25+
const init_code = quote
26+
using Test, JLArrays, SparseArrays
27+
28+
import Main: TestSuite
29+
end
30+
2131
args = parse_args(ARGS)
2232

2333
testsuite = Dict{String, Expr}()
2434
for AT in (:JLArray, :Array), name in keys(TestSuite.tests)
2535
testsuite["$(AT)/$name"] = :(TestSuite.tests[$name]($AT))
2636
end
2737

28-
runtests(GPUArrays, ARGS; init_code, testsuite)
38+
runtests(GPUArrays, ARGS; init_code, init_worker_code, testsuite)

0 commit comments

Comments
 (0)