Skip to content

feat(test): enable parallel tests#384

Open
Cuiyus wants to merge 3 commits intoalibaba:mainfrom
Cuiyus:feat/isolate-test-workdir
Open

feat(test): enable parallel tests#384
Cuiyus wants to merge 3 commits intoalibaba:mainfrom
Cuiyus:feat/isolate-test-workdir

Conversation

@Cuiyus
Copy link
Copy Markdown
Collaborator

@Cuiyus Cuiyus commented Apr 30, 2026

  • 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/2).

  • 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.

…t execution

- 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/2).

- 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.
Add pytest-xdist dependency and configure -n=auto to run Python tests
in parallel across all available CPU cores. Update CI workflows and
cibuildwheel test-requires accordingly.
@Cuiyus Cuiyus requested a review from feihongxu0824 as a code owner April 30, 2026 09:40
@Cuiyus Cuiyus changed the title feat(test): isolate test working directories and enable parallel ctes… feat(test): enable parallel tests Apr 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant