Update contributing#15505
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the repository contribution documentation and tweaks the test invocation to avoid failing builds when filtered runs find no tests.
Changes:
- Add
-ignore-exit-code 8to filtered test runs ineng/build.ps1. - Move/update contribution guidance from
docs/contribute.mdto a new rootCONTRIBUTING.md. - Update
README.mdto link toCONTRIBUTING.md.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| eng/build.ps1 | Adjusts test-run arguments to ignore “no tests found” exit code for filtered runs. |
| docs/contribute.md | Removes the old contribution guide document. |
| README.md | Points contributors to the new root CONTRIBUTING.md. |
| CONTRIBUTING.md | Introduces a refreshed contribution guide with updated build/test instructions. |
Comments suppressed due to low confidence (2)
eng/build.ps1:1
$filterStringnow contains multiple switches in a single argument string. If this variable is passed as a single argument to the test runner (common in PowerShell when building an args array), the runner will receive one argument containing spaces and may not parse-ignore-exit-codecorrectly. Prefer passing arguments as separate items (e.g., an args array with distinct--filter, filter value, and ignore-exit-code tokens) rather than concatenating multiple switches into one string.
[CmdletBinding(PositionalBinding = $false)]
eng/build.ps1:1
- The comment explains ignoring exit code 8 specifically for filtered runs, but this block also triggers when only
$testParameters.Count -gt 0. That means a run with no filter (but with test parameters) could silently ignore ‘no tests found’, potentially masking misconfiguration. Consider applying the ignore-exit-code behavior only when$filters.Count -gt 0(or splitting the condition so the ignore flag is added only for filtered runs).
[CmdletBinding(PositionalBinding = $false)]
| * Unit tests - run Test.cmd | ||
| * Smoke tests - run Test.cmd -smokeTest | ||
|
|
||
| Additional tests that can be run locally, but typically you would run just the ones related to changes, and rely on PR build to validate the complete change: | ||
|
|
||
| * Integration tests - run Test.cmd -integrationTest | ||
| * Compatibility tests - run Test.cmd -compatibilityTest | ||
| * Performance tests - run Test.cmd -performanceTest |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Updates contributor documentation and adjusts test execution behavior to avoid failing builds when filtered runs result in “no tests found”.
Changes:
- Add
-ignore-exit-code 8to test filter arguments ineng/build.ps1to prevent build failures when filters match no tests. - Replace
docs/contribute.mdwith a new root-levelCONTRIBUTING.mdand updateREADME.mdto link to it.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| eng/build.ps1 | Modifies how test filter arguments are composed to ignore exit code 8 (“no tests found”). |
| docs/contribute.md | Removes the old contribution guide (migrated/replaced by root-level guide). |
| README.md | Updates the contribution link to point to CONTRIBUTING.md. |
| CONTRIBUTING.md | Adds a new, streamlined contribution guide with updated build/test/debug instructions. |
Comments suppressed due to low confidence (2)
eng/build.ps1:1
- The comment and behavior are about filtered runs not matching any tests, but the condition also triggers when only
$testParametersare provided. This would ignore exit code 8 even without a filter, which can mask genuine misconfiguration (e.g., wrong test project selection). Consider appending-ignore-exit-code 8only when$filters.Count -gt 0, and keep the$testParameterspath separate.
[CmdletBinding(PositionalBinding = $false)]
eng/build.ps1:1
$filterStringnow contains more than just filter arguments (it also includes an exit-code policy). To keep intent clear and avoid future accidental coupling, consider either renaming to something like a general additional-args variable, or splitting into separate variables (one for--filter ..., another for ignore-exit-code) that are concatenated where the final command line is built.
[CmdletBinding(PositionalBinding = $false)]
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Jakub Jareš <me@jakubjares.com>
There was a problem hiding this comment.
Pull request overview
Updates contributor documentation and adjusts test invocation to avoid failing builds when filtered test runs find no matching tests (vstest issue #15457).
Changes:
- Update
eng/build.ps1to ignore exit code 8 (“no tests found”) during filtered runs. - Move contribution guide from
docs/contribute.mdto rootCONTRIBUTING.md. - Update
README.mdto point to the new contributing doc location.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| eng/build.ps1 | Appends an ignore-exit-code option to the filter/test-parameter argument string to prevent build failures when filters match no tests. |
| docs/contribute.md | Removes the old contribution guide (content moved to CONTRIBUTING.md). |
| README.md | Updates contributing link to CONTRIBUTING.md. |
| CONTRIBUTING.md | Adds a new root contribution guide with updated build/test instructions. |
Comments suppressed due to low confidence (1)
eng/build.ps1:1
- This block runs when either filters or test parameters are provided, but it always emits a
--filterargument. If$testParameters.Count -gt 0and$filters.Count -eq 0, this produces--filter \"\" ..., which can change behavior or fail the test invocation. Split the logic so--filter(and the-ignore-exit-code 8workaround) is only added when$filters.Count -gt 0, or build the final argument list from independent pieces (filter args vs. test-parameter args).
[CmdletBinding(PositionalBinding = $false)]
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: Jakub Jareš <me@jakubjares.com>
There was a problem hiding this comment.
Pull request overview
Updates contribution documentation location and adjusts test execution behavior to avoid failing builds when filters match no tests.
Changes:
- Add
-ignore-exit-code 8when running tests with filters to tolerate “no tests found”. - Move contribution guide content from
docs/contribute.mdto rootCONTRIBUTING.mdand update README links. - Remove the old
docs/contribute.mdfile.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| eng/build.ps1 | Adjusts constructed test arguments to ignore exit code 8 for filtered runs. |
| docs/contribute.md | Removes the old contribution guide file (content moved elsewhere). |
| README.md | Updates contribution link, but still contains references to the deleted docs/contribute.md. |
| CONTRIBUTING.md | Adds the new top-level contribution guide with updated build/test instructions. |
Comments suppressed due to low confidence (1)
eng/build.ps1:1
$filterStringnow contains non-filter arguments (-ignore-exit-code 8), which makes the variable misleading and increases the risk of quoting/escaping issues if this string is reused/combined elsewhere. Consider keeping--filter ...in$filterStringand appending-ignore-exit-code 8as a separate argument at the call site (or via a dedicated variable like$ignoreExitCodeArgs). Also, if the intent is to only ignore exit code 8 for filtered runs, gate the addition on$filters.Count -gt 0rather than the broader($filters.Count -gt 0 -or $testParameters.Count -gt 0)branch.
[CmdletBinding(PositionalBinding = $false)]
| @@ -61,7 +61,6 @@ NOTE: When adding a new public API, always add it directly to the `PublicAPI.Shi | |||
| VSTest can be built from within Visual Studio or from the CLI. | |||
|
|
|||
| - [Building with Visual Studio](./docs/contribute.md#building-with-visual-studio) | |||
Description
fix #15457
Related issue
Kindly link any related issues. E.g. Fixes #xyz.