v1.1.0-pre.4
Pre-release🌟 Added
Partials
A Partial is a new feature that allows a test author to work with portions of the same C module under test differently from within the same test file.
With Partials, a test can now cause some functions in the source module under test to be mocked while other source functions are executed against assertions (see #936). Partials also allow testing of static and inline functions with no modification of your source code under test.
💲 The Partials feature made possible thanks to a generous corporate sponsor via a Ceedling Assist engagement.
Two more example projects plus expanded temp_sensor project
wondrous_forest and cipher_quest join the existing temp_sensor project. All example projects now have comprehensive documentation.
- The
wondrous_foresttest-only project demonstrates using Partials in sample code reasonably representative of real-world use. - The
cipher_questproject is both a release and test build project that demonstrates conditional compilation builds (ifdef) and using Mixins to control builds.
The existing temp_sensor project has been expanded to more fully illustrate testing for embbeded development. It now shows a pure C approach to creating hardware access standins that allow testing of peripheral manipulation. The approach demonstrated divorces unit tests from any actual hardware dependence while preserving production C code as is.
Documentation site
Ceedling is now complemented by a full, searchable documentation site.
A local verion of this site that is navigable with your web browser from your filesystem is included within Ceedling and exportable through CLI commands.
Command line interface additions
ceedling helpoutput now provides links for further support and Github sponsorship.
New application commands
ceedling checkvalidates your configuration and produces logs from processing it without executing a build.ceedling docsexports the new HTML-based documentation site to your local filesystem.
Mixins inline YAML
The optional --mixin flag for all application commands supporting it now additionally supports inline YAML. Example: --mixin "=defines: {release: ['MY_SYMBOL']}"
Cppcheck static analysis plugin
Alejandro Rosso’s excellent Cppcheck plugin has been added to the stock plugin collection (with Alejandro’s permission). We’re excited to make it easier for everyone to use this great addition!
Valgrind memory check plugin
James Raphael Tiovalen’s helpful Valgrind plugin has been updated to work with the latest Ceedling and added to the stock plugin collection. Thank you, James for the great contribution!
GCov plugin code coverage enhancements
Support for Modified Condition / Decision Coverage
Ceedling’s GCov plugin for coverage reporting now supports the Modified Condition / Decision Coverage abilities of GCC 14+ and optionally GCovr 8+.
NOTE: The ReportGenerator tool does not support extracting MC/DC even if those metrics are available in the coverage data dumps that it processes. The GCov plugin can provide MC/DC metrics through its simplistic console reports and through the rich reports generated by GCovr.
Code coverage for all source files, not just those under test
This feature addition resolves a longstanding feature request for coverage reporting (#329 and others).
The Gcov plugin now includes an option (defaults to enabled) that causes all source files in the project that have not been exercised by unit tests to also be compiled with coverage. Doing so causes all source files to appear in the final coverage report; those untouched by unit tests are represented with 0% coverage.
See the GCov plugin documentation for more details on the new :untested_sources option.
Preprocessing for tests
System includes
Preprocessing support now properly distinguishes and handles system includes (#include <system.h>) and user includes (#include "user.h").
Fallback preprocessing
When your toolchain’s preprocessor lacks certain features, Ceedling still attempts to extract information and code from C files through fallback text processing. This fallback processing has been improved in a handful of ways, most notably implementing simple conditional compilation (#ifdef) processing.
Project configuration
:project ↳ :name
Optional project name that, if present, adds a new first line to build logging output with the project name.
:test_build ↳ :preprocess_force_fallback
When test preprocessing is enabled, Ceedling discovers whether your toolchain supports certain preprocessing options. If it does not, Ceedling uses simpler fallback options to extract text from C source and header files. This option overrides that discovery and forces the fallback options to be used. This is primarily used for Ceedling’s self-tests, but it could be handy if the automatic feature probe fails with a false positive.
💪 Fixed
- #1011 Performance Improvements.
- #1014 Line Continuations not working in test name.
- #1024 Fixed bug in options-handling for warnings log report.
- Now properly reports timing for single-batch builds (i.e. non-parallel builds).
- Mixins
- #1128 Command line mixin precedence.
- Revisions to Mixin documentation to correct merge order explanations and clarify Mixins generally.
- Multiple fixes and improvements to
#includes handling and preprocessing plus these issues & PRs:- PR #1126 Fix for race condition in cache handling of
#includelistings in YAML files. - #1015 Probing toolchain for presence of preprocessor directives-only ability.
- #1085 Fix relative
#includepath handling that broke test build convention. - #358 Mocks with relative path in
#includedirective. - PR #1056 Fix for extracting
#includedirective filenames that contain dashes. - #1127 Fixes to path handling in
#includedirectives. - #1158 Fixes for
#includefiltering in test runner generation.
- PR #1126 Fix for race condition in cache handling of
- Type handling in example
temp_sensorproject compatible with C23 (and previous C standards). - #1120 Fixed (by removal) an overly “helpful” holdover from Ceedling’s earliest days causing certain temporary and backup files to be cleaned that were needed by the user’s IDE and text editing tooling.
- #1162 Fixes to Partials handling for file encoding / multi-byte characters (e.g. ©) in comment blocks.
- #1160 Proper handling of locales and file encoding.
- #1135 Fixed test fixture results handling to properly process Unity’s colored output when enabled.
- #1114 Fixed
:default_taskshandling. - GCov plugin
:gcovsection of:flagsis able to use filename matchers again (like:testsection).- #1115 Fixed Gcov plugin for Gcovr configuration file handling.
- #1161 Fixed “Found no coverage results” when system headers are processed by coverage.
- #1170 GCovr summary not passed through to NORMAL logging at end of a GCov plugin build.
- Prevention of coverage corruption during
ReportGeneratorreporting runs.
- #1144 Fixed flags for release build linking.
- #1169 Fixed linking with :libraries ↳ :release.
⚠️ Changed
- PR #1003 improvements for Mixin merges — clearer logging and edge case handling.
- Added warning logging if a Mixin contains mixins (nesting is not supported).
- Mixins now merge list content according to mixin priority. In all cases but one, a higher priority mixin inserts its list content before the content of the existing list to which it is merging. In the case of
:tools:argumentslists, insertion occurs at the end of the arguments list to enable the typical CLI convention of rightmost argument having the highest priority. - Significant refactoring and improvements to logging and parallel processing.
- Streamlined preprocessing, eliminating redundant steps and reducing memory usage.
- The GCov plugin now compiles all files with coverage (and filters out unneeded framework results) in order to meet the stricter coverage handling that began with GCC 14. This change is backwards and forwards compatible with virtually all versions of GCC and the GCov plugin’s supporting utilities.
- Resolved ambiguity in updated
ceedling newhandling from 0.31.1 to 1.0.0. - Fixes for typos and grammar in documentation and logging.
👋 Removed
- CeedlingPacket.md user manual (superseded by new documentation site and local bundle).
- PluginDevelopmentGuide.md (superseded by new documentation site and local bundle).