Skip to content

Commit c40dc83

Browse files
committed
[ML] Fix test parallelism bug and pre-compile tests to prevent OOM
Fix $(TEST_PARALLEL) -> ${TEST_PARALLEL} typo in docker_entrypoint.sh. The command substitution syntax caused bash to try to execute a command called TEST_PARALLEL (which doesn't exist), resulting in an empty string and cmake interpreting bare -j as unlimited parallelism. This led to OOM kills during test compilation on CI agents. Also pre-compile test executables via build_tests target before running test_all_parallel, ensuring no compilation happens concurrently with test execution. Made-with: Cursor
1 parent b2043e9 commit c40dc83

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

dev-tools/docker/docker_entrypoint.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ if [ "x$1" = "x--test" ] ; then
7979
TEST_PARALLEL=$(( (NCPUS + 1) / 2 ))
8080
fi
8181
echo "Test parallelism: nproc=${NCPUS}, TEST_PARALLEL=${TEST_PARALLEL} (cmake --build -j ${TEST_PARALLEL})"
82-
cmake --build cmake-build-docker ${CMAKE_VERBOSE} -j $(TEST_PARALLEL) -t test_all_parallel || echo failed > build/test_status.txt
82+
cmake --build cmake-build-docker ${CMAKE_VERBOSE} -j ${TEST_PARALLEL} -t build_tests
83+
cmake --build cmake-build-docker ${CMAKE_VERBOSE} -j ${TEST_PARALLEL} -t test_all_parallel || echo failed > build/test_status.txt
8384
fi
8485

0 commit comments

Comments
 (0)