Skip to content

Commit

Permalink
Fixed runtests to put things with modules on node1.
Browse files Browse the repository at this point in the history
  • Loading branch information
kshyatt committed Jul 2, 2016
1 parent b74209c commit 0f9a986
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
2 changes: 1 addition & 1 deletion base/test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ record(ts::DefaultTestSet, t::AbstractTestSet) = push!(ts.results, t)

function print_test_errors(ts::DefaultTestSet)
for t in ts.results
if (isa(t, Error) || isa(t, Failure)) && myid() == 1
if (isa(t, Error) || isa(t, Fail)) && myid() == 1
Base.show(STDERR,t)
elseif isa(t, DefaultTestSet)
print_test_errors(t)
Expand Down
1 change: 1 addition & 0 deletions test/enums.jl
Original file line number Diff line number Diff line change
Expand Up @@ -165,4 +165,5 @@ let b = IOBuffer()
seekstart(b)
@test deserialize(b) === apple
end

end
18 changes: 14 additions & 4 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ function move_to_node1(t)
end
# Base.compile only works from node 1, so compile test is handled specially
move_to_node1("compile")
move_to_node1("enums")
move_to_node1("docs")
# In a constrained memory environment, run the parallel test after all other tests
# since it starts a lot of workers and can easily exceed the maximum memory
max_worker_rss != typemax(Csize_t) && move_to_node1("parallel")
Expand Down Expand Up @@ -61,14 +63,22 @@ cd(dirname(@__FILE__)) do
o_ts = Base.Test.DefaultTestSet("Overall")
Base.Test.push_testset(o_ts)
for res in results
Base.Test.push_testset(res[2][1])
Base.Test.record(o_ts, res[2][1])
Base.Test.pop_testset()
if isa(res[2][1], Exception)
Base.showerror(STDERR,res[2][1])
elseif isa(res[2][1], Base.Test.DefaultTestSet)
Base.Test.push_testset(res[2][1])
Base.Test.record(o_ts, res[2][1])
Base.Test.pop_testset()
end
end
println()
Base.Test.print_test_results(o_ts,0)
for res in results
println("Tests for $(res[1]) took $(res[2][2]) seconds, of which $(res[2][4]) were spent in gc ($(100*res[2][4]/res[2][2]) % ), and allocated $(res[2][3]) bytes.")
if !isa(res[2][1], Exception)
println("Tests for $(res[1]) took $(res[2][2]) seconds, of which $(res[2][4]) were spent in gc ($(100*res[2][4]/res[2][2]) % ), and allocated $(res[2][3]) bytes.")
else
o_ts.anynonpass = true
end
end

if !o_ts.anynonpass
Expand Down

0 comments on commit 0f9a986

Please sign in to comment.