Skip to content

Commit

Permalink
runtests: don't stop if exception is thrown with 1 worker (JuliaLang#…
Browse files Browse the repository at this point in the history
…23576)

And fix typo.
  • Loading branch information
rfourquet committed Sep 9, 2017
1 parent e16f4dc commit 36b7565
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ cd(dirname(@__FILE__)) do
resp = [e]
end
push!(results, (test, resp))
if (isa(resp[end], Integer) && (resp[end] > max_worker_rss)) || isa(resp, Exception)
if resp[1] isa Exception || resp[end] > max_worker_rss
if n > 1
rmprocs(wrkr, waitfor=30)
p = addprocs_with_testenv(1)[1]
remotecall_fetch(include, p, "testdefs.jl")
else
# single process testing, bail if mem limit reached, or, on an exception.
isa(resp, Exception) ? rethrow(resp) : error("Halting tests. Memory limit reached : $resp > $max_worker_rss")
# single process testing, bail if mem limit reached
resp[1] isa Exception || error("Halting tests. Memory limit reached : $resp > $max_worker_rss")
end
end
if !isa(resp[1], Exception)
Expand Down

0 comments on commit 36b7565

Please sign in to comment.