@@ -14,6 +14,7 @@ import LinearAlgebra: norm, diag, I, Diagonal, dot, eigen, issymmetric, mul!
1414import SparseArrays: normalize!, spdiagm
1515
1616debug_printing = false
17+ test_broken = false
1718
1819special_tests = [
1920 " bigfloat/initial_convergence" ,
@@ -155,15 +156,22 @@ function run_optim_tests(method; convergence_exceptions = (),
155156 printstyled (name, " did not converge with i = " , i, " \n " , color= :red )
156157 printstyled (results, " \n " , color= :red )
157158 end
159+ elseif test_broken
160+ @test_broken Optim. converged (results)
158161 end
159162 if ! ((name, i) in minimum_exceptions)
160163 @test Optim. minimum (results) < prob. minimum + sqrt (eps (typeof (prob. minimum)))
164+ elseif test_broken
165+ @test_broken Optim. minimum (results) < prob. minimum + sqrt (eps (typeof (prob. minimum)))
161166 end
162167 if ! ((name, i) in minimizer_exceptions)
163168 @test norm (Optim. minimizer (results) - prob. solutions) < 1e-2
169+ elseif test_broken
170+ @test_broken norm (Optim. minimizer (results) - prob. solutions) < 1e-2
164171 end
165172 end
166173 else
174+ @test_broken false # marked skipped tests as broken
167175 debug_printing && printstyled (" Skipping $name \n " , color= :blue )
168176 end
169177 end
@@ -216,14 +224,21 @@ function run_optim_tests_constrained(method; convergence_exceptions = (),
216224 printstyled (name, " did not converge\n " , color= :red )
217225 printstyled (results, " \n " , color= :red )
218226 end
227+ elseif test_broken
228+ @test_broken Optim. converged (results)
219229 end
220230 if ! (name in minimum_exceptions)
221231 @test Optim. minimum (results) < prob. minimum + sqrt (eps (typeof (prob. minimum)))
232+ elseif test_broken
233+ @test_broken Optim. minimum (results) < prob. minimum + sqrt (eps (typeof (prob. minimum)))
222234 end
223235 if ! (name in minimizer_exceptions)
224236 @test norm (Optim. minimizer (results) - prob. solutions) < 1e-2
237+ elseif test_broken
238+ @test_broken norm (Optim. minimizer (results) - prob. solutions) < 1e-2
225239 end
226240 else
241+ @test_broken false
227242 debug_printing && printstyled (" Skipping $name \n " , color= :blue )
228243 end
229244 end
0 commit comments