diff --git a/test/cholmod.jl b/test/cholmod.jl index e025119a..108b0ff8 100644 --- a/test/cholmod.jl +++ b/test/cholmod.jl @@ -1,8 +1,12 @@ # This file is a part of Julia. License is MIT: https://julialang.org/license module CHOLMODTests - using Test + +@static if !Base.USE_GPL_LIBS + @info "This Julia build excludes the use of SuiteSparse GPL libraries. Skipping CHOLMOD tests" +else + using SparseArrays.CHOLMOD using SparseArrays.CHOLMOD: getcommon using Random @@ -16,8 +20,6 @@ using SparseArrays: getcolptr using SparseArrays.LibSuiteSparse using SparseArrays.LibSuiteSparse: cholmod_l_allocate_sparse, cholmod_allocate_sparse -if Base.USE_GPL_LIBS - # CHOLMOD tests itypes = sizeof(Int) == 4 ? (Int32,) : (Int32, Int64) for Ti ∈ itypes, Tv ∈ (Float32, Float64) diff --git a/test/linalg_solvers.jl b/test/linalg_solvers.jl index f8a758c7..b59659b4 100644 --- a/test/linalg_solvers.jl +++ b/test/linalg_solvers.jl @@ -1,14 +1,16 @@ # This file is a part of Julia. License is MIT: https://julialang.org/license module SparseLinalgSolversTests - using Test + +@static if !Base.USE_GPL_LIBS + @info "This Julia build excludes the use of SuiteSparse GPL libraries. Skipping SparseLinalgSolvers Tests" +else + using SparseArrays using Random using LinearAlgebra -if Base.USE_GPL_LIBS - @testset "explicit zeros" begin a = SparseMatrixCSC(2, 2, [1, 3, 5], [1, 2, 1, 2], [1.0, 0.0, 0.0, 1.0]) @test lu(a)\[2.0, 3.0] ≈ [2.0, 3.0] diff --git a/test/spqr.jl b/test/spqr.jl index 121d47d7..122741ce 100644 --- a/test/spqr.jl +++ b/test/spqr.jl @@ -1,16 +1,19 @@ # This file is a part of Julia. License is MIT: https://julialang.org/license module SPQRTests - using Test + +@static if !Base.USE_GPL_LIBS + @info "This Julia build excludes the use of SuiteSparse GPL libraries. Skipping SPQR Tests" +else + using SparseArrays.SPQR using SparseArrays.CHOLMOD using LinearAlgebra: I, istriu, norm, qr, rank, rmul!, lmul!, Adjoint, Transpose, ColumnNorm, RowMaximum, NoPivot using SparseArrays: SparseArrays, sparse, sprandn, spzeros, SparseMatrixCSC using Random: seed! -# TODO REMOVE SECOND PREDICATE WITH SS7.1 -if Base.USE_GPL_LIBS + @testset "Sparse QR" begin m, n = 100, 10 nn = 100 diff --git a/test/umfpack.jl b/test/umfpack.jl index 66bd98d2..a00c4aca 100644 --- a/test/umfpack.jl +++ b/test/umfpack.jl @@ -1,15 +1,19 @@ # This file is a part of Julia. License is MIT: https://julialang.org/license module UMFPACKTests - using Test + +@static if !Base.USE_GPL_LIBS + @info "This Julia build excludes the use of SuiteSparse GPL libraries. Skipping UMFPACK Tests" +else + using Random using SparseArrays using Serialization using LinearAlgebra: LinearAlgebra, I, det, issuccess, ldiv!, lu, lu!, Transpose, SingularException, Diagonal, logabsdet using SparseArrays: nnz, sparse, sprand, sprandn, SparseMatrixCSC, UMFPACK, increment! -if Base.USE_GPL_LIBS + function umfpack_report(l::UMFPACK.UmfpackLU) UMFPACK.umfpack_report_numeric(l, 0) UMFPACK.umfpack_report_symbolic(l, 0)