fixup remove of examples/tests (#4971)

This commit is contained in:
Corentin Le Molgat
2026-01-07 16:14:45 +01:00
parent caab346d4d
commit a7ffad1950
4 changed files with 2 additions and 64 deletions

View File

@@ -93,7 +93,6 @@ Vagrant.configure("2") do |config|
config.vm.provision "file", source: "../../../../examples/dotnet", destination: "$HOME/project/examples/"
config.vm.provision "file", source: "../../../../examples/java", destination: "$HOME/project/examples/"
config.vm.provision "file", source: "../../../../examples/python", destination: "$HOME/project/examples/"
config.vm.provision "file", source: "../../../../examples/tests", destination: "$HOME/project/examples/"
config.vm.provision "file", source: "../../../../patches", destination: "$HOME/project/"
config.vm.provision "file", source: "../../../../Version.txt", destination: "$HOME/project/"
config.vm.provision "file", source: "../../../../tools/doc/orLogo.png", destination: "$HOME/project/tools/doc/"

View File

@@ -88,7 +88,6 @@ check_cpp: check_cpp_pimpl
test_cpp: \
cpp \
test_cc_tests \
test_cc_contrib \
test_cc_cpp
@@ -306,54 +305,6 @@ endef
CPP_EXAMPLES := contrib cpp
$(foreach example,$(CPP_EXAMPLES),$(eval $(call cpp-example-target,$(example))))
# Tests
CPP_TESTS := tests
$(TEMP_CPP_DIR)/tests: | $(TEMP_CPP_DIR)
-$(MKDIR) $(TEMP_CPP_DIR)$Stests
$(TEMP_CPP_DIR)/tests/%: \
$(SRC_DIR)/examples/tests/%.cc \
| $(TEMP_CPP_DIR)/tests
-$(MKDIR) $(TEMP_CPP_DIR)$Stests$S$*
$(TEMP_CPP_DIR)/tests/%/CMakeLists.txt: ${SRC_DIR}/ortools/cpp/CMakeLists.txt.in | $(TEMP_CPP_DIR)/tests/%
$(COPY) ortools$Scpp$SCMakeLists.txt.in $(TEMP_CPP_DIR)$Stests$S$*$SCMakeLists.txt
$(SED) -i -e 's/@CPP_NAME@/$*/' \
$(TEMP_CPP_DIR)$Stests$S$*$SCMakeLists.txt
$(SED) -i -e 's/@CPP_FILE_NAME@/$*.cc/' \
$(TEMP_CPP_DIR)$Stests$S$*$SCMakeLists.txt
$(SED) -i -e 's/@TEST_ARGS@//' \
$(TEMP_CPP_DIR)$Stests$S$*$SCMakeLists.txt
$(TEMP_CPP_DIR)/tests/%/%.cc: \
$(SRC_DIR)/examples/tests/%.cc \
| $(TEMP_CPP_DIR)/tests/%
$(MKDIR_P) $(TEMP_CPP_DIR)$Stests$S$*
$(COPY) $(SRC_DIR)$Sexamples$Stests$S$*.cc \
$(TEMP_CPP_DIR)$Stests$S$*
rcpp_%: \
cpp \
$(SRC_DIR)/examples/tests/%.cc \
$(TEMP_CPP_DIR)/tests/%/CMakeLists.txt \
$(TEMP_CPP_DIR)/tests/%/%.cc \
FORCE
cd $(TEMP_CPP_DIR)$Stests$S$* && \
cmake -S. -Bbuild \
-DCMAKE_BUILD_TYPE=$(BUILD_TYPE) \
-DCMAKE_PREFIX_PATH=$(OR_ROOT_FULL)/$(INSTALL_DIR) \
-DCMAKE_INSTALL_PREFIX=install \
$(CMAKE_ARGS) \
-G $(GENERATOR)
ifneq ($(PLATFORM),WIN64)
cd $(TEMP_CPP_DIR)$Stests$S$* && cmake --build build --config $(BUILD_TYPE) --target all -v
cd $(TEMP_CPP_DIR)$Stests$S$* && cmake --build build --config $(BUILD_TYPE) --target test -v
else
cd $(TEMP_CPP_DIR)$Stests$S$* && cmake --build build --config $(BUILD_TYPE) --target ALL_BUILD -v
cd $(TEMP_CPP_DIR)$Stests$S$* && cmake --build build --config $(BUILD_TYPE) --target RUN_TESTS -v
endif
##################################
## Course scheduling example ##
##################################
@@ -497,16 +448,6 @@ check_cpp_pimpl: \
rcpp_max_flow \
rcpp_min_cost_flow
.PHONY: test_cc_tests # Build and Run all C++ Tests (located in examples/tests)
test_cc_tests: \
rcpp_lp_test \
rcpp_bug_fz1 \
rcpp_cpp11_test \
rcpp_forbidden_intervals_test \
rcpp_issue57 \
rcpp_min_max_test
# $(MAKE) rcpp_issue173 # error: too long
.PHONY: test_cc_contrib # Build and Run all C++ Contrib (located in examples/contrib)
test_cc_contrib:

View File

@@ -379,7 +379,7 @@ check_java: \
rjava_LinearProgramming \
rjava_IntegerProgramming
.PHONY: test_java_tests # Build and Run all Java Tests (located in examples/tests)
.PHONY: test_java_tests # Build and Run all Java Tests (located in ortools/*/java)
test_java_tests: \
rjava_InitTest \
rjava_KnapsackSolverTest \

View File

@@ -234,15 +234,13 @@ check_python: \
# rpy_nurses_cp \
# rpy_job_shop_cp \
.PHONY: test_python_tests # Run all Python Tests (located in examples/tests)
.PHONY: test_python_tests # Run all Python Tests (located in ortools/*/python)
test_python_tests: \
rpy_init_test \
rpy_lp_api_test \
rpy_lp_test \
rpy_model_builder_test \
rpy_pywraplp_test \
rpy_cp_api_test \
rpy_routing_api_test \
rpy_pywrapcp_test \
rpy_pywraprouting_test \
rpy_cp_model_test \