Skip to content

Commit f0df0bf

Browse files
committed
Test for versioninfo
1 parent 5d3ef46 commit f0df0bf

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

test/runtests.jl

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,18 @@ end
99
@testset "Docstrings" begin
1010
@test isempty(Docs.undocumented_names(LinearAlgebra))
1111
end
12+
13+
@testset "versioninfo" begin
14+
vinfo = sprint(LinearAlgebra.versioninfo)
15+
@test occursin("Threading:", vinfo)
16+
@test occursin(r"Threads.threadpoolsize\(\) = [0-9]+", vinfo)
17+
@test occursin(r"Threads.maxthreadid\(\) = [0-9]+", vinfo)
18+
@test occursin(r"LinearAlgebra.BLAS.get_num_threads\(\) = [0-9]+", vinfo)
19+
@test occursin("Relevant environment variables:", vinfo)
20+
vars = strip(split(vinfo, "Relevant environment variables:")[end])
21+
@test any(occursin(vars), [r"JULIA_NUM_THREADS = [0-9]+", r"MKL_DYNAMIC = [0-9]+",
22+
r"MKL_NUM_THREADS = [0-9]+",
23+
r"OPENBLAS_NUM_THREADS = [0-9]+",
24+
r"GOTO_NUM_THREADS = [0-9]+",
25+
r"OMP_NUM_THREADS = [0-9]+", r"\[none\]"])
26+
end

0 commit comments

Comments
 (0)