Skip to content

Run each xtl test suite once under CTest - #295

Open
Boulea7 wants to merge 1 commit into
xtensor-stack:masterfrom
Boulea7:fix/ctest-single-registration
Open

Boulea7 wants to merge 1 commit into
xtensor-stack:masterfrom
Boulea7:fix/ctest-single-registration

Conversation

@Boulea7

@Boulea7 Boulea7 commented Dec 2, 2026

Copy link
Copy Markdown

Checklist

  • One commit with a descriptive title.
  • Verified the CTest entry points, the explicit aggregate executable, and the full case list.
  • Updated the build option documentation.

Description

CTest currently registers the individual test executables and the same cases again through xtest. Register the individual executables once and have the xtest build target invoke CTest. CTest can then schedule the tests according to CTEST_PARALLEL_LEVEL. The platform workflows can build test_xtl as an explicit target.

Run the suite with cmake --build <build-dir> --target xtest or with ctest --test-dir <build-dir> after building the test executables. The CTest entries are the individual test names.

Fixes #288.

Validation

  • On macOS arm64 in Release, verified that CTest goes from 446 executions to 223, with the same case names.
  • Ran all 21 executables through CTest and through xtest with two-way CTest parallelism.
  • Built and ran the explicit test_xtl target. All 223 cases passed.
  • Checked standalone configuration and Debug and Release command generation with Ninja Multi-Config.

AI assistance was used for this change and its verification.

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.

ctest unit tests are run twice

1 participant