/
runtests_single_solver.jl
57 lines (48 loc) · 1.2 KB
/
runtests_single_solver.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
using Convex
using FactCheck
tests = ["test_utilities.jl",
"test_affine.jl",
"test_lp.jl"]
tests_socp = ["test_socp.jl"]
tests_sdp = ["test_sdp.jl"]
tests_exp = ["test_exp.jl"]
tests_int = ["test_int.jl"]
tests_exp_and_sdp = ["test_exp_and_sdp.jl"]
println("Running tests:")
# The following syntax can be used to solve it using other solvers
# using Gurobi
# set_default_solver(GurobiSolver())
for curtest in tests
info(" Test: $(curtest)")
include(curtest)
end
if can_solve_socp(get_default_solver())
for curtest in tests_socp
info(" Test: $(curtest)")
include(curtest)
end
end
if can_solve_sdp(get_default_solver())
for curtest in tests_sdp
info(" Test: $(curtest)")
include(curtest)
end
end
if can_solve_exp(get_default_solver())
for curtest in tests_exp
info(" Test: $(curtest)")
include(curtest)
end
end
if can_solve_sdp(get_default_solver()) && can_solve_exp(get_default_solver())
for curtest in tests_exp_and_sdp
info(" Test: $(curtest)")
include(curtest)
end
end
if can_solve_mip(get_default_solver())
for curtest in tests_int
info(" Test: $(curtest)")
include(curtest)
end
end