forked from JuliaLang/julia
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathruntests.jl
32 lines (25 loc) · 892 Bytes
/
runtests.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# This file is a part of Julia. License is MIT: http://julialang.org/license
include("choosetests.jl")
tests, net_on = choosetests(ARGS)
tests = unique(tests)
# Base.compile only works from node 1, so compile test is handled specially
compile_test = "compile" in tests
if compile_test
splice!(tests, findfirst(tests, "compile"))
end
cd(dirname(@__FILE__)) do
n = 1
if net_on
n = min(8, CPU_CORES, length(tests))
n > 1 && addprocs(n; exeflags=`--check-bounds=yes --depwarn=error`)
blas_set_num_threads(1)
end
@everywhere include("testdefs.jl")
reduce(propagate_errors, nothing, pmap(runtests, tests; err_retry=false, err_stop=true))
if compile_test
n > 1 && print("\tFrom worker 1:\t")
runtests("compile")
end
@unix_only n > 1 && rmprocs(workers(), waitfor=5.0)
println(" \033[32;1mSUCCESS\033[0m")
end