feat(test): enable parallel tests (#384)
- Set unique WORKING_DIRECTORY per test binary via cc_test()/cuda_test() to prevent filesystem path conflicts when running tests in parallel. Each test runs in ${CMAKE_BINARY_DIR}/test_tmp/${test_name}/.
- Enable parallel ctest execution in the unittest target with ProcessorCount-based --parallel flag (defaults to NPROC - 1).
- Set TEST_BINARY_DIR environment variable for crash recovery tests so they can locate helper binaries from isolated working directories.
- Update LocateDataGenerator() and LocateOptimizeGenerator() to search TEST_BINARY_DIR and TEST_BINARY_DIR/bin for helper executables.
This commit is contained in:
@@ -93,6 +93,7 @@ jobs:
|
||||
cmake==3.30.0 \
|
||||
ninja==1.11.1 \
|
||||
pytest \
|
||||
pytest-xdist \
|
||||
scikit-build-core \
|
||||
setuptools_scm
|
||||
shell: bash
|
||||
|
||||
@@ -64,6 +64,7 @@ jobs:
|
||||
cmake==3.30.0 `
|
||||
ninja==1.11.1 `
|
||||
pytest `
|
||||
pytest-xdist `
|
||||
scikit-build-core `
|
||||
setuptools_scm
|
||||
shell: powershell
|
||||
|
||||
@@ -59,6 +59,7 @@ jobs:
|
||||
ninja==1.11.1 \
|
||||
pytest \
|
||||
pytest-cov \
|
||||
pytest-xdist \
|
||||
scikit-build-core \
|
||||
setuptools_scm
|
||||
shell: bash
|
||||
|
||||
Reference in New Issue
Block a user