6
6
module TestCSDP
7
7
8
8
using Test
9
- using MathOptInterface
9
+ import MathOptInterface as MOI
10
10
import CSDP
11
11
12
- const MOI = MathOptInterface
13
-
14
12
function runtests ()
15
13
for name in names (@__MODULE__ ; all = true )
16
14
if startswith (" $(name) " , " test_" )
@@ -51,15 +49,9 @@ function test_unsupported_constraint()
51
49
end
52
50
53
51
function test_runtests ()
54
- model = MOI. Utilities. CachingOptimizer (
55
- MOI. Utilities. UniversalFallback (MOI. Utilities. Model {Float64} ()),
56
- MOI. instantiate (CSDP. Optimizer, with_bridge_type = Float64),
57
- )
52
+ model = MOI. instantiate (CSDP. Optimizer, with_bridge_type = Float64)
58
53
# `Variable.ZerosBridge` makes dual needed by some tests fail.
59
- MOI. Bridges. remove_bridge (
60
- model. optimizer,
61
- MathOptInterface. Bridges. Variable. ZerosBridge{Float64},
62
- )
54
+ MOI. Bridges. remove_bridge (model, MOI. Bridges. Variable. ZerosBridge{Float64})
63
55
MOI. set (model, MOI. Silent (), true )
64
56
MOI. Test. runtests (
65
57
model,
@@ -73,36 +65,34 @@ function test_runtests()
73
65
MOI. SolverVersion,
74
66
],
75
67
),
76
- exclude = String [
68
+ exclude = Regex [
77
69
# Known test failures.
78
70
# Empty constraint not supported:
79
- " test_conic_PositiveSemidefiniteConeTriangle" ,
80
- " test_linear_VectorAffineFunction_empty_row" ,
81
- # Unable to bridge RotatedSecondOrderCone to PSD because the the dimension is too small: got 2, expected >= 3
82
- " test_conic_SecondOrderCone_INFEASIBLE" ,
83
- " test_constraint_PrimalStart_DualStart_SecondOrderCone" ,
84
- # TODO (odow): unknown test failures.
85
- " test_conic_RotatedSecondOrderCone_VectorOfVariables" ,
86
- " test_variable_solve_with_lowerbound" ,
87
- " test_modification_delete_variables_in_a_batch" ,
71
+ r" test_conic_PositiveSemidefiniteConeTriangle$" ,
72
+ r" test_linear_VectorAffineFunction_empty_row$" ,
73
+ # Terminates with status `5` which means "Stuck at edge of primal feasibility."
74
+ r" test_quadratic_constraint_basic" ,
75
+ r" test_quadratic_constraint_minimize" ,
76
+ # Unknown test failures.
88
77
# Working locally but getting into numerical issues in CI
89
- " test_quadratic_constraint_basic" ,
90
- " test_quadratic_constraint_minimize" ,
91
- " test_conic_SecondOrderCone_negative_post_bound" ,
92
- " test_conic_SecondOrderCone_no_initial_bound" ,
93
- " test_linear_integration" ,
94
- " test_modification_coef_scalar_objective" ,
95
- " test_modification_const_scalar_objective" ,
96
- " test_modification_delete_variable_with_single_variable_obj" ,
97
- " test_modification_transform_singlevariable_lessthan" ,
98
- " test_objective_FEASIBILITY_SENSE_clears_objective" ,
99
- " test_objective_ObjectiveFunction_blank" ,
100
- " test_objective_ObjectiveFunction_duplicate_terms" ,
101
- " test_solve_result_index" ,
102
- " test_modification_set_singlevariable_lessthan" ,
103
- " test_objective_ObjectiveFunction_VariableIndex" ,
104
- " test_conic_SecondOrderCone_nonnegative_initial_bound" ,
105
- " test_solve_TerminationStatus_DUAL_INFEASIBLE" ,
78
+ r" test_quadratic_constraint_basic$" ,
79
+ r" test_quadratic_constraint_minimize$" ,
80
+ r" test_conic_SecondOrderCone_negative_post_bound$" ,
81
+ r" test_conic_SecondOrderCone_no_initial_bound$" ,
82
+ r" test_linear_integration$" ,
83
+ r" test_modification_coef_scalar_objective$" ,
84
+ r" test_modification_const_scalar_objective$" ,
85
+ r" test_modification_delete_variable_with_single_variable_obj$" ,
86
+ r" test_modification_transform_singlevariable_lessthan$" ,
87
+ r" test_objective_FEASIBILITY_SENSE_clears_objective$" ,
88
+ r" test_objective_ObjectiveFunction_blank$" ,
89
+ r" test_objective_ObjectiveFunction_duplicate_terms$" ,
90
+ r" test_solve_result_index$" ,
91
+ r" test_modification_set_singlevariable_lessthan$" ,
92
+ r" test_objective_ObjectiveFunction_VariableIndex$" ,
93
+ r" test_conic_SecondOrderCone_nonnegative_initial_bound$" ,
94
+ r" test_solve_TerminationStatus_DUAL_INFEASIBLE$" ,
95
+ r" test_conic_RotatedSecondOrderCone_VectorOfVariables$" ,
106
96
],
107
97
)
108
98
return
0 commit comments