From b948bbe7ee6d1e6053d1b0471cfd6058deef37d0 Mon Sep 17 00:00:00 2001 From: Corentin Le Molgat Date: Wed, 17 Jul 2024 15:41:53 +0200 Subject: [PATCH] math_opt: disable broken tests --- ortools/math_opt/solver_tests/ip_parameter_tests.cc | 6 ++++++ ortools/math_opt/solver_tests/status_tests.cc | 6 ++++++ ortools/math_opt/solver_tests/testdata/BUILD.bazel | 4 ++-- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/ortools/math_opt/solver_tests/ip_parameter_tests.cc b/ortools/math_opt/solver_tests/ip_parameter_tests.cc index 883b4584ca0..bcfc4f3eea4 100644 --- a/ortools/math_opt/solver_tests/ip_parameter_tests.cc +++ b/ortools/math_opt/solver_tests/ip_parameter_tests.cc @@ -1099,6 +1099,9 @@ TEST_P(LargeInstanceIpParameterTest, IterationLimit) { } TEST_P(LargeInstanceIpParameterTest, NodeLimit) { + if (GetParam().solver_type == SolverType::kHighs) { + GTEST_SKIP() << "Ignoring this test as Highs 1.7+ returns unimplemented"; + } ASSERT_OK_AND_ASSIGN(std::unique_ptr model, Load23588()); SolveParameters params = GetParam().base_parameters; params.node_limit = 1; @@ -1219,6 +1222,9 @@ TEST_P(LargeInstanceIpParameterTest, BestBoundLimit) { } TEST_P(LargeInstanceIpParameterTest, SolutionLimit) { + if (GetParam().solver_type == SolverType::kHighs) { + GTEST_SKIP() << "Ignoring this test as Highs 1.7+ returns unimplemented"; + } ASSERT_OK_AND_ASSIGN(std::unique_ptr model, Load23588()); SolveParameters params = GetParam().base_parameters; params.solution_limit = 1; diff --git a/ortools/math_opt/solver_tests/status_tests.cc b/ortools/math_opt/solver_tests/status_tests.cc index 5ac30030f11..b973db956f3 100644 --- a/ortools/math_opt/solver_tests/status_tests.cc +++ b/ortools/math_opt/solver_tests/status_tests.cc @@ -99,6 +99,9 @@ TEST_P(StatusTest, PrimalAndDualInfeasible) { << "Ignoring this test as GLPK gets stuck in presolve for IP's " "with a primal-dual infeasible LP relaxation."; } + if (GetParam().solver_type == SolverType::kHighs) { + GTEST_SKIP() << "Ignoring this test as Highs 1.7+ returns error."; + } Model model; const Variable x1 = @@ -373,6 +376,9 @@ TEST_P(StatusTest, IncompleteIpSolve) { GTEST_SKIP() << "Ignoring this test as it is an IP-only test and requires " "support for node_limit."; } + if (GetParam().solver_type == SolverType::kHighs) { + GTEST_SKIP() << "Ignoring this test as Highs 1.7+ returns MODEL_INVALID"; + } ASSERT_OK_AND_ASSIGN(const std::unique_ptr model, Load23588()); SolveArguments args = { .parameters = {.enable_output = true, .node_limit = 1}}; diff --git a/ortools/math_opt/solver_tests/testdata/BUILD.bazel b/ortools/math_opt/solver_tests/testdata/BUILD.bazel index ecee65a5cc5..970bfacb409 100644 --- a/ortools/math_opt/solver_tests/testdata/BUILD.bazel +++ b/ortools/math_opt/solver_tests/testdata/BUILD.bazel @@ -12,6 +12,6 @@ # limitations under the License. exports_files([ - "23588.mps", - "beavma.mps", + "23588.mps", + "beavma.mps", ])