Skip to content

Commit 3c8cc75

Browse files
committed
Refactor tests to allow working with ReTest
1 parent 5a99a13 commit 3c8cc75

File tree

3 files changed

+128
-121
lines changed

3 files changed

+128
-121
lines changed

test/ExtendableSparseReTest.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# See https://wias-pdelib.github.io/VoronoiFVM.jl/dev/devel/#ReTest
2+
3+
module ExtendableSparseReTest
4+
using ReTest
5+
include("alltests.jl")
6+
end

test/alltests.jl

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
using LinearAlgebra
2+
using SparseArrays
3+
using ExtendableSparse
4+
#using ExtendableSparse.Experimental
5+
using Printf
6+
using BenchmarkTools
7+
8+
using MultiFloats
9+
using ForwardDiff
10+
using ExplicitImports
11+
12+
@testset "ExplicitImports" begin
13+
@test ExplicitImports.check_no_implicit_imports(ExtendableSparse) === nothing
14+
@test ExplicitImports.check_no_stale_explicit_imports(ExtendableSparse) === nothing
15+
end
16+
17+
@testset "Parallel" begin
18+
include("test_parallel.jl")
19+
20+
for Tm in [STExtendableSparseMatrixCSC, MTExtendableSparseMatrixCSC, ExtendableSparseMatrix]
21+
for N in [10000, 20000]
22+
test_parallel.test_correctness_build_seq(N, Tm, dim = 2)
23+
end
24+
end
25+
26+
for Tm in [MTExtendableSparseMatrixCSC]
27+
for N in [10000, 20000]
28+
test_parallel.test_correctness_update(N, Tm, dim = 2)
29+
test_parallel.test_correctness_build(N, Tm, dim = 2)
30+
test_parallel.test_correctness_mul(N, Tm, dim = 2)
31+
end
32+
end
33+
end
34+
35+
# @testset "ExperimentalParallel" begin
36+
# include("ExperimentalParallel.jl")
37+
# for d=[1,2,3]
38+
# for N in [10,rand(30:40),50]
39+
# ExperimentalParallel.test_correctness_build(N,d)
40+
# end
41+
# end
42+
# end
43+
44+
45+
@testset "Constructors" begin
46+
include("test_constructors.jl")
47+
end
48+
49+
@testset "Copy-Methods" begin
50+
include("test_copymethods.jl")
51+
end
52+
53+
@testset "Updates" begin
54+
include("test_updates.jl")
55+
end
56+
57+
@testset "Assembly" begin
58+
include("test_assembly.jl")
59+
end
60+
61+
@testset "Construction timings" begin
62+
include("test_timings.jl")
63+
end
64+
65+
@testset "Operations" begin
66+
include("test_operations.jl")
67+
end
68+
69+
@testset "fdrand" begin
70+
include("test_fdrand.jl")
71+
end
72+
73+
@testset "Backslash" begin
74+
include("test_backslash.jl")
75+
end
76+
77+
@testset "Dirichlet" begin
78+
include("test_dirichlet.jl")
79+
end
80+
81+
@testset "LinearSolve" begin
82+
include("test_linearsolve.jl")
83+
end
84+
85+
@testset "Preconditioners" begin
86+
include("test_preconditioners.jl")
87+
end
88+
89+
@testset "Symmetric" begin
90+
include("test_symmetric.jl")
91+
end
92+
93+
@testset "ExtendableSparse.LUFactorization" begin
94+
include("test_default_lu.jl")
95+
end
96+
97+
@testset "Sparspak" begin
98+
include("test_sparspak.jl")
99+
end
100+
101+
if ExtendableSparse.USE_GPL_LIBS
102+
@testset "Cholesky" begin
103+
include("test_default_cholesky.jl")
104+
end
105+
end
106+
107+
@testset "block" begin
108+
include("test_block.jl")
109+
end
110+
111+
#@testset "parilu0" begin include("test_parilu0.jl") end
112+
113+
114+
# @testset "mkl-pardiso" begin if !Sys.isapple()
115+
# include("test_mklpardiso.jl")
116+
# end end
117+
118+
119+
# if Pardiso.PARDISO_LOADED[]
120+
# @testset "pardiso" begin include("test_pardiso.jl") end
121+
# end

test/runtests.jl

Lines changed: 1 addition & 121 deletions
Original file line numberDiff line numberDiff line change
@@ -1,122 +1,2 @@
11
using Test
2-
using LinearAlgebra
3-
using SparseArrays
4-
using ExtendableSparse
5-
#using ExtendableSparse.Experimental
6-
using Printf
7-
using BenchmarkTools
8-
9-
using MultiFloats
10-
using ForwardDiff
11-
using ExplicitImports
12-
13-
@testset "ExplicitImports" begin
14-
@test ExplicitImports.check_no_implicit_imports(ExtendableSparse) === nothing
15-
@test ExplicitImports.check_no_stale_explicit_imports(ExtendableSparse) === nothing
16-
end
17-
18-
@testset "Parallel" begin
19-
include("test_parallel.jl")
20-
21-
for Tm in [STExtendableSparseMatrixCSC, MTExtendableSparseMatrixCSC, ExtendableSparseMatrix]
22-
for N in [10000, 20000]
23-
test_parallel.test_correctness_build_seq(N, Tm, dim = 2)
24-
end
25-
end
26-
27-
for Tm in [MTExtendableSparseMatrixCSC]
28-
for N in [10000, 20000]
29-
test_parallel.test_correctness_update(N, Tm, dim = 2)
30-
test_parallel.test_correctness_build(N, Tm, dim = 2)
31-
test_parallel.test_correctness_mul(N, Tm, dim = 2)
32-
end
33-
end
34-
end
35-
36-
# @testset "ExperimentalParallel" begin
37-
# include("ExperimentalParallel.jl")
38-
# for d=[1,2,3]
39-
# for N in [10,rand(30:40),50]
40-
# ExperimentalParallel.test_correctness_build(N,d)
41-
# end
42-
# end
43-
# end
44-
45-
46-
@testset "Constructors" begin
47-
include("test_constructors.jl")
48-
end
49-
50-
@testset "Copy-Methods" begin
51-
include("test_copymethods.jl")
52-
end
53-
54-
@testset "Updates" begin
55-
include("test_updates.jl")
56-
end
57-
58-
@testset "Assembly" begin
59-
include("test_assembly.jl")
60-
end
61-
62-
@testset "Construction timings" begin
63-
include("test_timings.jl")
64-
end
65-
66-
@testset "Operations" begin
67-
include("test_operations.jl")
68-
end
69-
70-
@testset "fdrand" begin
71-
include("test_fdrand.jl")
72-
end
73-
74-
@testset "Backslash" begin
75-
include("test_backslash.jl")
76-
end
77-
78-
@testset "Dirichlet" begin
79-
include("test_dirichlet.jl")
80-
end
81-
82-
@testset "LinearSolve" begin
83-
include("test_linearsolve.jl")
84-
end
85-
86-
@testset "Preconditioners" begin
87-
include("test_preconditioners.jl")
88-
end
89-
90-
@testset "Symmetric" begin
91-
include("test_symmetric.jl")
92-
end
93-
94-
@testset "ExtendableSparse.LUFactorization" begin
95-
include("test_default_lu.jl")
96-
end
97-
98-
@testset "Sparspak" begin
99-
include("test_sparspak.jl")
100-
end
101-
102-
if ExtendableSparse.USE_GPL_LIBS
103-
@testset "Cholesky" begin
104-
include("test_default_cholesky.jl")
105-
end
106-
end
107-
108-
@testset "block" begin
109-
include("test_block.jl")
110-
end
111-
112-
#@testset "parilu0" begin include("test_parilu0.jl") end
113-
114-
115-
# @testset "mkl-pardiso" begin if !Sys.isapple()
116-
# include("test_mklpardiso.jl")
117-
# end end
118-
119-
120-
# if Pardiso.PARDISO_LOADED[]
121-
# @testset "pardiso" begin include("test_pardiso.jl") end
122-
# end
2+
include("alltests.jl")

0 commit comments

Comments
 (0)