Skip to content

refactor cmake tests: per-test CMakeLists.txt and per-call run_cmake args#90

Merged
thetic merged 2 commits into
mainfrom
simplify-cmake-tests
Apr 25, 2026
Merged

refactor cmake tests: per-test CMakeLists.txt and per-call run_cmake args#90
thetic merged 2 commits into
mainfrom
simplify-cmake-tests

Conversation

@thetic
Copy link
Copy Markdown
Owner

@thetic thetic commented Apr 25, 2026

Description

Replace the single shared configure/CMakeLists.txt (a 15-branch if/elseif ladder keyed on RunCMake_TEST) with one CMakeLists.txt per test case, so each configure-time test is self-contained and readable in isolation.

Extend run_cmake() to accept trailing -D flags as per-call options, eliminating the stateful list(APPEND/REMOVE_ITEM RunCMake_TEST_OPTIONS) pattern from RunCMakeTest.cmake.

Also removes the CMake <3.10 compatibility shim from mu.tiny.cmake. The project already requires CMake 3.29, so the TEST_INCLUDE_FILE singular-property path and its _MUTINY_CMAKE_VERSION_OVERRIDE escape hatch were unreachable dead code.

Related Issues

N/A

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactor / test improvement

Manual Verification (Optional)

N/A

Checklist

  • I have written/updated documentation in docs/ for any user-facing changes.
  • My code follows the project's naming conventions (mu::tiny namespace, INCLUDED_MU_TINY_ guards, mutiny_ C-prefix).
  • For new features, I have considered if a C-interface adapter (.h and .c.cpp) is required for parity.
  • I have reviewed the CONTRIBUTING.md file to ensure compliance with architectural guidelines.

thetic added 2 commits April 24, 2026 22:16
…args

Replace the single shared configure/CMakeLists.txt (a 15-branch if/elseif
ladder keyed on RunCMake_TEST) with one CMakeLists.txt per test case, so
each test is self-contained and readable in isolation.

Extend run_cmake() to accept extra -D flags as trailing arguments, so
per-test cache-variable settings (MUTINY_TESTS_DETAILED, MUTINY_EXTRA_ARGS,
etc.) are passed at the call site instead of via a stateful
list(APPEND/REMOVE_ITEM RunCMake_TEST_OPTIONS) dance.
The project requires CMake 3.29 (cmake_minimum_required in CMakeLists.txt),
so the TEST_INCLUDE_FILE singular-property path and its _MUTINY_CMAKE_VERSION_OVERRIDE
escape hatch are unreachable dead code.  Remove them along with the two tests
that exercised that path.
@coveralls
Copy link
Copy Markdown

coveralls commented Apr 25, 2026

Coverage Status

coverage: 98.926%. remained the same — simplify-cmake-tests into main

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 25, 2026

TestsPassed ✅Skipped ⚠️Failed
JUnit Tests1064 ran1055 passed9 skipped0 failed

@thetic thetic merged commit 150ab4b into main Apr 25, 2026
41 checks passed
@thetic thetic deleted the simplify-cmake-tests branch April 25, 2026 05:33
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.

2 participants