Repository navigation
Delta builds: regenerate a runner and preprocessed test file when what they read changes - #1345
Merged
Merged
Conversation
Test-file preprocessing moves into TestFilePreprocessinator, and runner details and generation into TestRunnerGeneratinator, which owns the one runner target both stages check. TestPipelineManager sequences them. TestBuildExecutor no longer needs the test context extractor or the TEST_SOURCE_FILE() resolver, and its comment on mock stand-ins describes StandinHeaderinator. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Preprocessinator#preprocessed_dependencies reads the files any output with line markers entered, a full expansion as well as directives-only output. TestPipelineHelpers#register_preprocessed_dependencies registers the project files among them, which stage 4's directives-only pass now uses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The preprocessed test file was cached against the test file alone, but it comes from a full expansion that reads every header the test reaches. A header that enables a test case could therefore leave the test case out of the runner. The stage now registers the project files its expansion entered, from the expansion's line markers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The runner was keyed on the raw test file and runner configuration alone, but it is generated from stage 4's reconciled mock and include lists and from test case names parsed from the preprocessed test file. A header macro that enables a mock or a test case changed neither, so the runner was skipped and the new mock was never initialized or verified, or the new test case never ran. The runner target now depends on its input file as well as the test file, and carries its mock and include lists in its meta. 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
Two delta-build gaps from the #1083 work could leave a stale runner after a change that doesn't touch the test file. Both are new in the 1.2.0 prerelease (1.1.x rebuilt every stage every run), so there is no Changelog entry.
Init/Verify/Destroynever ran, so a missing expected call went undetected, a false pass. The runner target now depends on its input file too, and carries its mock and include lists in its meta.gcc -Eexpansion reads every header the test reaches, but only the test file, flags, defines and search paths were tracked. A test case guarded by a macro defined in a header never appeared after the header enabled it, so the test was silently never run. Stage 11 now registers the project files its expansion's line markers name, as stage 4's directives-only pass already does.Refactor
TestBuildExecutorintoTestFilePreprocessinator(stage 11) andTestRunnerGeneratinator(stages 12–13). Both are fully RuboCop compliant.TestPipelineHelpers#register_preprocessed_dependencies.Preprocessinator#directives_only_dependenciesbecomespreprocessed_dependencies, since it reads any-Eoutput.PIPELINE.mdand the dependencies README are updated.Tests
objects.ymlentries.conditional_mock_includes_spec.rb, both red onnext_versionand green here (GCC 14, Docker):MODULE_2, the rebuilt runner includesmock_MyModulePart2;FEATURE_X, the guarded test case runs (TESTEDgoes from 1 to 2).delta_builds,plugin_delta_builds,preprocessing_parameterized_tests,test_source_file_directiveandshuffle_testspass, so unchanged builds still skip these stages.🤖 Generated with Claude Code