Repository navigation
Set mock search paths from the preprocessor's #includes (#1083 Case 1) - #1343
Merged
Merged
Conversation
A test's mock search paths came from the text scan of its #includes, which ignores #if, and were never revisited once preprocessing settled the list. A mock in a branch that is off, whose header does not exist, stopped the build (#1083), and a mock only the preprocessor sees, such as one a macro names, got no search path for its mirrored directory. The text-scan paths now skip a mock without a header when test preprocessing is on. Where stage 4 reconciles, its first pass sets the paths again from the preprocessor's list, and it places stand-ins for a list recalled from cache too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This fixes a 1.2.0 prerelease regression, #1083 Case 1, and a second regression with the same cause.
A test's mock search paths came from stage 2's text scan of its
#includes. That scan ignores#if, and the paths were never revisited after stage 4 settled the list through the preprocessor (introduced in41602f17, first inv1.2.0-pre.8). Two things went wrong:#ifbranch that is off, whose header does not exist, stopped the build in every mode (Found no file `Gpt_HwType1.h`). On 1.1.10 it builds with:testsand:all.mock_widget.h: No such file or directory). On 1.1.10 it builds.Changes
FileFinder#resolve_mock/#find_header_input_for_mocktakecomplain:, defaulting to:error. With a tolerating level, a missing header resolves to[nil, nil]. Existing callers are unchanged.collect_mock_search_paths) skips a scanned mock without a header when test preprocessing is on, because the preprocessor may discard it. With preprocessing off, the scanned list is the build's own, and a missing header still stops the build.-MM -MGlist, which is the only source reconciliation draws on. This happens before the directives-only pass, which needs those paths to find the stand-ins.lib/ceedling/test_invoker/PIPELINE.mdis revised against the code: the two#includelists, stage 4's three passes, stand-ins, where mock search paths come from, and corrections throughout.No Changelog entry, since this is a prerelease regression.
Testing
conditional_mock_includes::testsand:all;:none, and with fallback preprocessing forced, the build stops naming the missing header, which pins the known gap;:testsand:all.rake specs:unitsandrake specs:integrationpass, and lint is clean;madsciencelab-plugins(GCC 14);#1083 stays open for Case 2, which needs its own design.
🤖 Generated with Claude Code