Skip to content

Update contributing#15505

Merged
nohwnd merged 5 commits into
microsoft:mainfrom
nohwnd:contrib
Mar 18, 2026
Merged

Update contributing#15505
nohwnd merged 5 commits into
microsoft:mainfrom
nohwnd:contrib

Conversation

@nohwnd

@nohwnd nohwnd commented Mar 17, 2026

Copy link
Copy Markdown
Member

Description

fix #15457

Related issue

Kindly link any related issues. E.g. Fixes #xyz.

  • I have ensured that there is a previously discussed and approved issue.

Copilot AI review requested due to automatic review settings March 17, 2026 11:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 8 to filtered test runs in eng/build.ps1.
  • Move/update contribution guidance from docs/contribute.md to a new root CONTRIBUTING.md.
  • Update README.md to link to CONTRIBUTING.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

  • $filterString now 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-code correctly. 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)]

Comment thread CONTRIBUTING.md Outdated
Comment thread CONTRIBUTING.md Outdated
Comment thread CONTRIBUTING.md Outdated
Comment on lines +55 to +62
* 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
Comment thread CONTRIBUTING.md Outdated
Comment thread CONTRIBUTING.md Outdated
Comment thread README.md
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 17, 2026 12:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 8 to test filter arguments in eng/build.ps1 to prevent build failures when filters match no tests.
  • Replace docs/contribute.md with a new root-level CONTRIBUTING.md and update README.md to 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 $testParameters are 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 8 only when $filters.Count -gt 0, and keep the $testParameters path separate.
[CmdletBinding(PositionalBinding = $false)]

eng/build.ps1:1

  • $filterString now 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)]

Comment thread CONTRIBUTING.md Outdated
Comment thread CONTRIBUTING.md Outdated
Comment thread eng/build.ps1
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 17, 2026 13:40
Comment thread CONTRIBUTING.md Outdated
Co-authored-by: Jakub Jareš <me@jakubjares.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.ps1 to ignore exit code 8 (“no tests found”) during filtered runs.
  • Move contribution guide from docs/contribute.md to root CONTRIBUTING.md.
  • Update README.md to 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 --filter argument. If $testParameters.Count -gt 0 and $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 8 workaround) 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)]

Comment thread CONTRIBUTING.md Outdated
Comment thread README.md
Comment thread README.md Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Jakub Jareš <me@jakubjares.com>
Copilot AI review requested due to automatic review settings March 17, 2026 18:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 8 when running tests with filters to tolerate “no tests found”.
  • Move contribution guide content from docs/contribute.md to root CONTRIBUTING.md and update README links.
  • Remove the old docs/contribute.md file.

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

  • $filterString now 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 $filterString and appending -ignore-exit-code 8 as 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 0 rather than the broader ($filters.Count -gt 0 -or $testParameters.Count -gt 0) branch.
[CmdletBinding(PositionalBinding = $false)]

Comment thread README.md
@@ -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)
This was referenced Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move developer instructions to CONTRIBUTING.md in root of the repo

3 participants