Skip to content

Commit

Permalink
Run LinearAlgebra tests with --compile=min.
Browse files Browse the repository at this point in the history
  • Loading branch information
maleadt committed Jan 21, 2020
1 parent 0549bf1 commit 1014383
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
15 changes: 14 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
9 changes: 8 additions & 1 deletion test/testenv.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1014383

Please sign in to comment.