Skip to content

Commit

Permalink
test: skip PETSc tests on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
avik-pal committed Oct 25, 2024
1 parent 370aa68 commit 897c326
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions test/wrappers/rootfind_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ end
PETScSNES(; autodiff = missing)
]
alg isa CMINPACK && Sys.isapple() && continue
alg isa PETScSNES && Sys.iswindows() && continue
sol = solve(prob_iip, alg)
@test SciMLBase.successful_retcode(sol.retcode)
@test maximum(abs, sol.resid) < 1e-6
Expand All @@ -43,6 +44,7 @@ end
PETScSNES(; autodiff = missing)
]
alg isa CMINPACK && Sys.isapple() && continue
alg isa PETScSNES && Sys.iswindows() && continue
sol = solve(prob_oop, alg)
@test SciMLBase.successful_retcode(sol.retcode)
@test maximum(abs, sol.resid) < 1e-6
Expand All @@ -67,6 +69,7 @@ end
PETScSNES(; autodiff = missing)
]
alg isa CMINPACK && Sys.isapple() && continue
alg isa PETScSNES && Sys.iswindows() && continue
local sol
sol = solve(prob_iip, alg)
@test SciMLBase.successful_retcode(sol.retcode)
Expand All @@ -86,6 +89,7 @@ end
PETScSNES(; autodiff = missing)
]
alg isa CMINPACK && Sys.isapple() && continue
alg isa PETScSNES && Sys.iswindows() && continue
local sol
sol = solve(prob_oop, alg)
@test SciMLBase.successful_retcode(sol.retcode)
Expand All @@ -108,7 +112,7 @@ end
]

alg isa CMINPACK && Sys.isapple() && continue

alg isa PETScSNES && Sys.iswindows() && continue
sol = solve(prob_tol, alg, abstol = tol)
@test abs(sol.u[1] - sqrt(2)) < tol
end
Expand Down Expand Up @@ -160,10 +164,12 @@ end
sol = solve(ProbN, SIAMFANLEquationsJL(; method = :pseudotransient); abstol = 1e-8)
@test maximum(abs, sol.resid) < 1e-6
sol = solve(ProbN, PETScSNES(); abstol = 1e-8)
@test maximum(abs, sol.resid) < 1e-6
if !Sys.iswindows()
@test maximum(abs, sol.resid) < 1e-6
end
end

@testitem "PETSc SNES Floating Points" setup=[WrapperRootfindImports] tags=[:wrappers] begin
@testitem "PETSc SNES Floating Points" setup=[WrapperRootfindImports] tags=[:wrappers] skip=:(Sys.iswindows()) begin
f(u, p) = u .* u .- 2

u0 = [1.0, 1.0]
Expand Down

0 comments on commit 897c326

Please sign in to comment.