Skip to content

Commit d591c51

Browse files
committed
examples/cpp: disable flacky strawberry_fields_with_column_generation_test (#5118)
1 parent dde278d commit d591c51

5 files changed

Lines changed: 481 additions & 196 deletions

File tree

cmake/cpp.cmake

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ endif()
173173
# GTest::gtest_main
174174
# )
175175
function(ortools_cxx_test)
176-
set(options "")
176+
set(options "DISABLED")
177177
set(oneValueArgs "NAME")
178178
set(multiValueArgs
179179
"SOURCES;COMPILE_DEFINITIONS;COMPILE_OPTIONS;LINK_LIBRARIES;LINK_OPTIONS")
@@ -224,6 +224,11 @@ function(ortools_cxx_test)
224224
COMMAND ${TEST_NAME}
225225
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
226226
)
227+
if(TEST_DISABLED)
228+
set_tests_properties(cxx_${TEST_NAME} PROPERTIES
229+
DISABLED TRUE
230+
)
231+
endif()
227232
message(STATUS "Configuring test ${TEST_NAME} ...DONE")
228233
endfunction()
229234

@@ -392,7 +397,7 @@ find_package(Python3 COMPONENTS Interpreter)
392397
# "BINTEST_foo_bar_data=$(CMAKE_CURRENT_SOURCE_DIR)/foo_bar_data.txt"
393398
# )
394399
function(ortools_cxx_bintest)
395-
set(options "")
400+
set(options "DISABLED")
396401
set(oneValueArgs "NAME;SCRIPT")
397402
set(multiValueArgs "ENVIRONMENT")
398403
cmake_parse_arguments(BINTEST
@@ -421,6 +426,11 @@ function(ortools_cxx_bintest)
421426
set_tests_properties(${BINTEST_NAME} PROPERTIES
422427
ENVIRONMENT "${BINTEST_ENVIRONMENT}"
423428
)
429+
if(BINTEST_DISABLED)
430+
set_tests_properties(${BINTEST_NAME} PROPERTIES
431+
DISABLED TRUE
432+
)
433+
endif()
424434
message(STATUS "Configuring bintest ${BINTEST_NAME} ...DONE")
425435
endfunction()
426436

examples/cpp/BUILD.bazel

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -648,6 +648,9 @@ bintest(
648648
size = "large",
649649
srcs = [":strawberry_fields_with_column_generation_test.bintest"],
650650
named_data = {"strawberry_fields_with_column_generation": ":strawberry_fields_with_column_generation"},
651+
# flacky on almalinux and rockylinux
652+
# see: https://github.com/google/or-tools/issues/5118
653+
tags = ["noci"],
651654
)
652655

653656
# Dimacs assignment problems

examples/cpp/CMakeBazel.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,7 @@ ortools_cxx_bintest(
297297
NAME bzl_cc_example_strawberry_fields_with_column_generation_test
298298
SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/strawberry_fields_with_column_generation_test.bintest
299299
ENVIRONMENT BINTEST_strawberry_fields_with_column_generation=$<TARGET_FILE:bzl_cc_example_strawberry_fields_with_column_generation>
300+
DISABLED
300301
)
301302

302303
ortools_cxx_library(

tools/build/BUILD.bazel

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,11 @@
1111
# See the License for the specific language governing permissions and
1212
# limitations under the License.
1313

14-
load("@pip_deps//:requirements.bzl", "requirement")
1514
load("@rules_python//python:py_binary.bzl", "py_binary")
1615

1716
package(default_visibility = ["//visibility:public"])
1817

1918
py_binary(
2019
name = "bazel2cmake",
2120
srcs = ["bazel2cmake.py"],
22-
deps = [requirement("absl-py")],
2321
)

0 commit comments

Comments
 (0)