From 1014383ecce0f41eb81546397617133966522389 Mon Sep 17 00:00:00 2001 From: Tim Besard Date: Tue, 21 Jan 2020 15:13:02 +0100 Subject: [PATCH] Run LinearAlgebra tests with --compile=min. --- test/runtests.jl | 15 ++++++++++++++- test/testenv.jl | 9 ++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index 9955748de3a32a..61cc5aa1d69ae3 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -63,6 +63,15 @@ move_to_node1("stress") # since it starts a lot of workers and can easily exceed the maximum memory limited_worker_rss && move_to_node1("Distributed") +# the last node is special: runs with --compile=min, and takes tests from the back of the list +function move_to_last(t) + last_tests = filter(test->occursin(t,test), tests) + filter!(test->!occursin(t,test), tests) + append!(tests, last_tests) + nothing +end +move_to_last(r"LinearAlgebra/.*") + import LinearAlgebra cd(@__DIR__) do n = 1 @@ -187,7 +196,11 @@ cd(@__DIR__) do @async begin push!(all_tasks, current_task()) while length(tests) > 0 - test = popfirst!(tests) + test = if p == last(workers()) + pop!(tests) + else + popfirst!(tests) + end running_tests[test] = now() local resp wrkr = p diff --git a/test/testenv.jl b/test/testenv.jl index e07355301b55ae..ddaf8e73ae8007 100644 --- a/test/testenv.jl +++ b/test/testenv.jl @@ -26,7 +26,14 @@ if !@isdefined(testenv_defined) const test_exename = popfirst!(test_exeflags.exec) end - addprocs_with_testenv(X; kwargs...) = addprocs(X; exename=test_exename, exeflags=test_exeflags, kwargs...) + function addprocs_with_testenv(X; kwargs...) + if X > 1 + [addprocs(X-1; exename=test_exename, exeflags=test_exeflags, kwargs...); + addprocs(1; exename=test_exename, exeflags=`$test_exeflags --compile=min`, kwargs...)] + else + addprocs(X; exename=test_exename, exeflags=test_exeflags, kwargs...) + end + end const curmod = @__MODULE__ const curmod_name = fullname(curmod)