[ML] Replace shell test runner with portable CMake/CTest infrastructure#2903
Open
edsavage wants to merge 1 commit intoelastic:mainfrom
Open
[ML] Replace shell test runner with portable CMake/CTest infrastructure#2903edsavage wants to merge 1 commit intoelastic:mainfrom
edsavage wants to merge 1 commit intoelastic:mainfrom
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
c40dc83 to
b18aaf5
Compare
Replace run_tests_as_seperate_processes.sh with a portable CMake script (cmake/run-tests-individually.cmake) that works on Linux, macOS and Windows without requiring bash, sed, awk or xargs. The new script discovers Boost.Test cases via --list_content, generates a temporary CTest project, and runs them in parallel via ctest --parallel. It supports the same environment variables as the old shell script (BOOST_TEST_MAX_ARGS, BOOST_TEST_MAX_PROCS, BOOST_TEST_OUTPUT_FORMAT_FLAGS) plus TEST_FLAGS for additional flags. Other changes: - Add include(CTest) to CMakeLists.txt and rename custom "test" target to "ml_test" to avoid conflict with CTest's built-in target - Upgrade add_test() to modern NAME/COMMAND form with JUNIT output and WORKING_DIRECTORY - Fix CMultiFileDataAdderTest parallel isolation: use PID instead of a random number in [1,100] for unique temp filenames, eliminating the collision risk that caused intermittent test failures - Handle seccomp test specially (force HRF logging to avoid sandbox I/O restrictions) - Consolidate isMultiConfig branches for test_individually targets Made-with: Cursor
d55a944 to
0d4d137
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
run_tests_as_seperate_processes.shwith a portable CMake/CTest-based parallel test runner (cmake/run-tests-individually.cmake)-j 2for <=4 cores,ceil(ncpus/2)for higher countsCMultiFileDataAdderTestparallel isolation using PID instead of random numberstest_individuallytarget in Gradle for CITest plan
-jvaluesCKMostCorrelatedTest/testScalepasses reliably at-j 2on 4-core machinesMade with Cursor