Add standalone runtime test repro skills - #132289
Open
jkoritzinsky wants to merge 2 commits into
Open
Conversation
Add focused skills for resolving runtime tests from wrapper paths or fully qualified method names, generating standalone corerun apps, and composing scenario-aware dotenv files. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 909db69e-bf77-405e-8010-9fbcea0fe9d2
|
Azure Pipelines: Successfully started running 1 pipeline(s). 15 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds new GitHub Copilot skills under .github/skills/ to help turn managed src/tests CoreCLR tests into standalone, editable console repro apps runnable with corerun, including scenario-aware environment generation via testenvironment.proj.
Changes:
- Add
test-scenario-envskill to evaluatesrc/tests/Common/testenvironment.projvia MSBuild and produce a CoreRun-compatible.env, optionally merged with a test project’sCLRTestEnvironmentVariableitems. - Add
standalone-test-reproskill plus two resolution sub-skills (-cmdand-method) to map wrappers / fully qualified test methods to an owning project + source method, then guide extraction intoartifacts/tmp. - Document wrapper-order env merging semantics (scenario first, project items second) and fidelity checks for the resulting repro.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
.github/skills/test-scenario-env/SKILL.md |
New skill spec for generating a CoreRun dotenv file from testenvironment.proj and optionally merging project env items. |
.github/skills/standalone-test-repro/SKILL.md |
New end-to-end workflow spec to extract a single managed runtime test into a standalone repro app under artifacts/tmp. |
.github/skills/standalone-test-repro-method/SKILL.md |
New sub-skill spec for resolving a test from a fully qualified method name / xUnit display name. |
.github/skills/standalone-test-repro-cmd/SKILL.md |
New sub-skill spec for resolving a test from a generated .cmd/.sh wrapper path and capturing effective invocation. |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 909db69e-bf77-405e-8010-9fbcea0fe9d2
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.
Suppressed comments (3)
.github/skills/test-scenario-env/SKILL.md:74
- The MSBuild example passes
/p:TestEnvFileName=<temporary.sh>without a path, but the preceding text says the temporary script should be generated under the resolved output directory. Unless the working directory is changed, MSBuild will write this file relative to the current directory, not the output directory. Use an explicit (and quoted) path so the temp script location is deterministic.
./dotnet.sh msbuild src/tests/Common/testenvironment.proj /t:CreateTestEnvFile /p:Scenario=<scenario> /p:TestEnvFileName=<temporary.sh> /p:TargetsWindows=false /p:RuntimeVariant=<variant>
.github/skills/test-scenario-env/SKILL.md:68
- The MSBuild example passes
/p:TestEnvFileName=<temporary.cmd>without a path, but the preceding text says the temporary script should be generated under the resolved output directory. Unless the working directory is changed, MSBuild will write this file relative to the current directory (likely the repo root), not the output directory. Use an explicit (and quoted) path so the temp script location is deterministic.
This issue also appears on line 74 of the same file.
.\dotnet.cmd msbuild src\tests\Common\testenvironment.proj /t:CreateTestEnvFile /p:Scenario=<scenario> /p:TestEnvFileName=<temporary.cmd> /p:TargetsWindows=true /p:RuntimeVariant=<variant>
.github/skills/test-scenario-env/SKILL.md:103
- Dotenv values can’t escape
$via backslash in CoreRun’s parser, and variable expansion is only supported as${NAME}and is disabled only by quoting the entire value with single quotes. The current wording (“single-quote escaping”) is ambiguous and could be read as escaping just the$. Consider clarifying that the whole value should be single-quoted (and how to escape embedded').
- Preserve non-expansion format tokens such as `%d`. Protect a literal `$` with
single-quote escaping so CoreRun does not interpret it as substitution.
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.
Runtime CI failures often identify tests through generated wrapper paths or fully qualified methods. Reproducing them requires preserving project-specific environment variables and named stress scenarios while producing an editable source-level app that runs directly with
corerun.Summary
src/teststests into standalone console applications runnable withcorerun.src/tests/Common/testenvironment.proj.CLRTestEnvironmentVariablevalues in runtime-wrapper order, with project settings taking precedence.Validation
20260812) selected 100 unique Windows x64-compatible tests across 45 projects against a Debug Core_Root with Release libraries.100.RequiresProcessIsolation = true(indices 37, 47, 65, 86, and 93); each original and repro ran in its owncorerunprocess..envsettings and local native dependencies were preserved and exercised.Note
This pull request description was generated by GitHub Copilot.