From 8a17ddc25c6eb5ec01636f02a4c95459422ab1b6 Mon Sep 17 00:00:00 2001 From: kshyatt Date: Sun, 3 Jul 2016 01:11:27 -0700 Subject: [PATCH] Fixes --- base/test.jl | 4 ++-- test/loading.jl | 2 ++ test/runtests.jl | 4 +++- test/staged.jl | 2 -- test/test_sourcepath.jl | 2 -- test/testdefs.jl | 2 +- test/tuple.jl | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/base/test.jl b/base/test.jl index e447fdb8b59cc..218ec449d9179 100644 --- a/base/test.jl +++ b/base/test.jl @@ -424,12 +424,12 @@ record(ts::DefaultTestSet, t::Broken) = (push!(ts.results, t); t) # For the other result types, immediately print the error message # but do not terminate. Print a backtrace. function record(ts::DefaultTestSet, t::Union{Fail, Error}) - if myid() == 0 + if myid() == 1 print_with_color(:white, ts.description, ": ") print(t) # don't print the backtrace for Errors because it gets printed in the show # method - isa(t, Error) || Base.show_backtrace(STDOUT, backtrace()) + isa(t, Error) || Base.show_backtrace(STDERR, backtrace()) println() end push!(ts.results, t) diff --git a/test/loading.jl b/test/loading.jl index 6e222b0278276..43fb4079d8e70 100644 --- a/test/loading.jl +++ b/test/loading.jl @@ -1,5 +1,7 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license + + @test @__LINE__ == 5 include("test_sourcepath.jl") diff --git a/test/runtests.jl b/test/runtests.jl index 4132694111422..167ff6fa745c8 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -21,6 +21,8 @@ end move_to_node1("compile") move_to_node1("enums") move_to_node1("docs") +move_to_node1("loading") +move_to_node1("subarray") # 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") @@ -72,7 +74,7 @@ cd(dirname(@__FILE__)) do end end println() - Base.Test.print_test_results(o_ts,0) + Base.Test.print_test_results(o_ts,1) for res in results 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.") diff --git a/test/staged.jl b/test/staged.jl index 387a43bb24140..8f064b56b5e3a 100644 --- a/test/staged.jl +++ b/test/staged.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "staged" begin @generated function staged_t1(a,b) if a == Int return :(a+b) @@ -206,4 +205,3 @@ let decorate(bar) @test in(typeof(bar), decorated) end -end diff --git a/test/test_sourcepath.jl b/test/test_sourcepath.jl index 4c61fdd24fb66..0c99f06670c23 100644 --- a/test/test_sourcepath.jl +++ b/test/test_sourcepath.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@test "sourcepath" begin # source path in tasks path = Base.source_path()::String # this variable is leaked to the source script @test endswith(path, joinpath("test","test_sourcepath.jl")) @@ -17,4 +16,3 @@ end == path end == path @test isabspath(@__FILE__) -end diff --git a/test/testdefs.jl b/test/testdefs.jl index 109c7d742bffa..a0712011c022b 100644 --- a/test/testdefs.jl +++ b/test/testdefs.jl @@ -3,7 +3,7 @@ using Base.Test function runtests(name) - @printf(" \033[1m*\033[0m \033[31m%-21s\033[0m", name) + @printf(" \033[1m*\033[0m \033[31m%-21s\033[0m\n", name) coolness = @timed @testset "$name" begin include("$name.jl") end diff --git a/test/tuple.jl b/test/tuple.jl index e8b2b778a0b96..3bd92a873cce3 100644 --- a/test/tuple.jl +++ b/test/tuple.jl @@ -1,6 +1,6 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license @testset "indexing" begin - @test length(()) != 0 + @test length(()) == 0 @test length((1,)) === 1 @test length((1,2)) === 2