Skip to content

Commit

Permalink
Test in parallel
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasnoack committed May 20, 2016
1 parent ab23126 commit 4ac7d95
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions test/runtests.jl
Expand Up @@ -27,10 +27,19 @@ tests = [

print_with_color(:blue, "Running tests:\n")

srand(345678)
if nworkers() > 1
rmprocs(workers())
end

if Base.JLOptions().code_coverage == 1
addprocs(CPU_CORES, exeflags = ["--code-coverage=user", "--inline=no", "--check-bounds=yes"])
else
addprocs(CPU_CORES, exeflags = "--check-bounds=yes")
end

for t in tests
test_fn = "$t.jl"
print_with_color(:green, "* $test_fn\n")
include(test_fn)
using Distributions
@everywhere srand(345679)
pmap(tests) do t
include(t*".jl")
nothing
end

0 comments on commit 4ac7d95

Please sign in to comment.