Repository navigation
tests: copy every local import of the debug launcher into the run.ps1 control - #3701
Merged
Merged
Conversation
… control The real_log_error control copies debug_launch.py plus a hard-coded list of local modules into a scratch tree. R0Y00#3674 (58352a6) added 'from stall_watch import StallWatch' to debug_launch.py and did not update that list, so the copied launcher died with ModuleNotFoundError before reaching the events.txt open. The control then reported that the debugger log error was not captured, because the summary held the missing module instead of the PermissionError it looks for. Derive the list from debug_launch.py's own imports so the next addition cannot break the control the same way.
R0Y00
approved these changes
Dec 1, 2026
R0Y00
left a comment
Owner
There was a problem hiding this comment.
Reviewed the temporary launcher fixture dependency discovery. Local startup_run_ps1 passed outside the sandbox, including the expected real launcher log error path.
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.
Change
The
real_log_errorcontrol ofstartup_run_ps1copies the realdebug_launch.pyinto a scratch tree,then makes
log/events.txta directory so the launcher raisesPermissionErrorand the check looks for thattext in the captured summary. The modules it copied alongside were a hard-coded list:
#3674 (
58352a682) added an import to the launcher:and did not update that list. The copied launcher therefore dies at import with
ModuleNotFoundError, beforeit reaches
events.txt; the exit code is still 1, so the exit-code half of the control passes, and thesummary half fails:
Fix
Copy every local module
debug_launch.pyimports, derived from the file itself, instead of a list that has tobe maintained by hand — so the next import addition cannot break this control the same way.
Verification
In-box dev preset,
daddf6155:The
powershellandpwshcases both pass, which is what distinguishes this from an environment problem:the failure was Python import resolution inside the copied tree, identical on both shells.
Refs #3674.