[ML] Run all test suites in parallel via unified CTest invocation#2913
Merged
edsavage merged 1 commit intoelastic:mainfrom Feb 23, 2026
Merged
[ML] Run all test suites in parallel via unified CTest invocation#2913edsavage merged 1 commit intoelastic:mainfrom
edsavage merged 1 commit intoelastic:mainfrom
Conversation
Replace the sequential per-suite test execution with a single CTest invocation that discovers all test cases across all 10 suites and schedules them optimally across available CPU cores. The new test_all_parallel target: - Discovers 1588 test cases from all suites via --list_content - Groups them into batches (MAX_ARGS=2) within each suite - Runs all batches in a single ctest --parallel pool - Produces per-suite JUnit files for Buildkite test-collector - Handles multi-config generators (Windows) and BOOST_TEST_OUTPUT_FORMAT_FLAGS Local benchmark (14-core Mac): 64s vs several minutes sequential. Co-authored-by: Cursor <cursoragent@cursor.com>
✅ 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. |
8 tasks
edsavage
added a commit
to edsavage/ml-cpp
that referenced
this pull request
Feb 26, 2026
…astic#2913) Replace the sequential per-suite test execution with a single CTest invocation that discovers all test cases across all 10 suites and schedules them optimally across available CPU cores. The new test_all_parallel target: - Discovers 1588 test cases from all suites via --list_content - Groups them into batches (MAX_ARGS=2) within each suite - Runs all batches in a single ctest --parallel pool - Produces per-suite JUnit files for Buildkite test-collector - Handles multi-config generators (Windows) and BOOST_TEST_OUTPUT_FORMAT_FLAGS Local benchmark (14-core Mac): 64s vs several minutes sequential. Co-authored-by: Cursor <cursoragent@cursor.com>
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
cmake/run-all-tests-parallel.cmake— a CMake script that discovers ALL test cases from ALL 10 test suites and runs them in a singlectest --parallelpooltest_all_parallelCMake target that builds all tests then invokes the unified runnertest_all_parallelintodocker_entrypoint.sh(Linux x86_64) andbuild.gradle(macOS/Windows)How it works
--list_contentto discover test casesMAX_ARGS(default: 2) within each suiteCTestTestfile.cmakewith all batches across all suitesctest --parallel Nwhere N =ceil(cpus/2)for >4 cores, 2 otherwiseKey details
BOOST_TEST_OUTPUT_FORMAT_FLAGSis cleared during--list_contentdiscovery to prevent JUnit logger interference, then restored for executionBUILD_TYPEvariable for config-specific executable pathsPATHandCPP_SRC_HOMEare set for DLL discovery and resource filesPerformance
Local benchmark (14-core Mac, MAX_PROCS=7, MAX_ARGS=2):
Test plan
docker_entrypoint.sh)docker_entrypoint.sh)build.gradle)build.gradle)Made with Cursor