Skip to content

[main] Source code updates from microsoft/vstest #1509

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/source-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,10 @@
"commitSha": "43d52c423e7ed37cf59a01629f9bace5c6bf6f96"
},
{
"barId": 272429,
"barId": 275283,
"path": "vstest",
"remoteUri": "https://github.com/microsoft/vstest",
"commitSha": "cdcfb7f5c163d7b7a555b129522c3b868f73e92c"
"commitSha": "8b102963a8cce7809a6956fe0a6df5cb93b2447a"
},
{
"barId": 273947,
Expand Down
12 changes: 12 additions & 0 deletions src/vstest/.github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2
updates:
- package-ecosystem: "dotnet-sdk"
directory: "/"
schedule:
interval: "weekly"
day: "wednesday"
ignore:
- dependency-name: "*"
update-types:
- "version-update:semver-major"
- "version-update:semver-minor"
13 changes: 2 additions & 11 deletions src/vstest/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,6 @@
</PropertyGroup>

<PropertyGroup>
<!--
This version is read by vsts-prebuild.ps1 and is a base for the current version, this should be updated at the start of
new iteration to the goal number. This is also used to version the local packages. This version needs to be statically
readable when we read the file as xml, don't move it to a .props file, unless you change the build server process
-->
<TPVersionPrefix>17.10.0</TPVersionPrefix>
<!--
Versioning is defined from the build script. Use a default dev build if it's not defined.
Sets the AssemblyVersion, AssemblyFileVersion and AssemblyInformationalVersion
-->
<Version Condition="'$(Version)' == ''">$(TPVersionPrefix)-dev</Version>
<!-- Override the AssemblyVersion as 15.0.0 since protocol depends on this version for serialization. This is also defined in build script. -->
<AssemblyVersion Condition="'$(AssemblyVersion)' == ''">15.0.0</AssemblyVersion>
<!-- Auto generating binding redirects breaks testhost when running under net8.0 vstest.console as .NET Framework net462. -->
Expand Down Expand Up @@ -147,6 +136,8 @@
<TestRunnerName>MSTest</TestRunnerName>
<!-- Skip windows only tests on non-windows systems. -->
<TestRunnerAdditionalArguments Condition=" '$(OS)' != 'Windows_NT' ">$(TestRunnerAdditionalArguments) --filter "TestCategory!=Windows&amp;TestCategory!=Windows-Review"</TestRunnerAdditionalArguments>
<!-- Do not capture test output on CI to help community see errors -->
<TestCaptureOutput Condition=" '$(ContinuousIntegrationBuild)' == 'true' ">false</TestCaptureOutput>
</PropertyGroup>

</Project>
1 change: 1 addition & 0 deletions src/vstest/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ stages:
-nobl
-integrationTest
-performanceTest
/bl:$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)/Test.binlog
name: Test
displayName: Test

Expand Down
2 changes: 1 addition & 1 deletion src/vstest/docs/contribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ default, `Debug` configuration is run.
If you want to run a particular test. Eg: Test Name that contains Blame in Acceptance test

```shell
> test.cmd -p accept -f net451 -filter blame
> .\test.cmd -bl -c release /p:TestRunnerAdditionalArguments="'--filter Blame'" -Integration
```

## Deployment
Expand Down
2 changes: 2 additions & 0 deletions src/vstest/dotnet.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[dotnet.test.runner]
name = "Microsoft.Testing.Platform"
8 changes: 4 additions & 4 deletions src/vstest/eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<Dependencies>
<Source Uri="https://github.com/dotnet/dotnet" Mapping="vstest" Sha="9bcfe617e4f615d6931e2eec47767c3f15116d1d" BarId="272322" />
<ProductDependencies>
<Dependency Name="Microsoft.Internal.CodeCoverage" Version="17.14.3-preview.25164.1">
<Dependency Name="Microsoft.Internal.CodeCoverage" Version="17.15.0-preview.25354.5">
<Uri>https://dev.azure.com/devdiv/DevDiv/_git/vs-code-coverage</Uri>
<Sha>414b8035705ca246a1b7331eab02a656b0dc3706</Sha>
<Sha>b3c8a0e7de26919a4efd2a347133522dca5b8ee6</Sha>
</Dependency>
<Dependency Name="Microsoft.Diagnostics.NETCore.Client" Version="0.2.631904">
<Uri>https://github.com/dotnet/dotnet</Uri>
Expand All @@ -27,9 +27,9 @@
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="9.0.0-beta.25302.2">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="10.0.0-beta.25358.3">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>0d52a8b262d35fa2fde84e398cb2e791b8454bd2</Sha>
<Sha>4e526204e83e615efe8eb5743be7fbccfa4e492a</Sha>
</Dependency>
<Dependency Name="Microsoft.DiaSymReader.Pdb2Pdb" Version="1.1.0-beta2-19575-01">
<Uri>https://github.com/dotnet/symreader-converter</Uri>
Expand Down
22 changes: 12 additions & 10 deletions src/vstest/eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from appending +<commitId>, which breaks DTAAgent.
-->
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
<VersionPrefix>17.15.0</VersionPrefix>
<VersionPrefix>18.0.0</VersionPrefix>
<PreReleaseVersionLabel>preview</PreReleaseVersionLabel>
</PropertyGroup>
<PropertyGroup Label="Arcade settings">
Expand Down Expand Up @@ -51,13 +51,13 @@
<MicrosoftDiagnosticsNETCoreClientVersion>0.2.631904</MicrosoftDiagnosticsNETCoreClientVersion>
<MicrosoftExtensionsDependencyModelPackageVersion>6.0.2</MicrosoftExtensionsDependencyModelPackageVersion>
<MicrosoftExtensionsFileSystemGlobbingVersion>6.0.0</MicrosoftExtensionsFileSystemGlobbingVersion>
<MicrosoftFakesVersion>17.12.0</MicrosoftFakesVersion>
<MicrosoftInternalCodeCoverageVersion>17.14.3-preview.25164.1</MicrosoftInternalCodeCoverageVersion>
<MicrosoftFakesVersion>18.0.0-beta.25364.2</MicrosoftFakesVersion>
<MicrosoftInternalCodeCoverageVersion>17.15.0-preview.25354.5</MicrosoftInternalCodeCoverageVersion>
<!--
Make sure you are taking a version from a release branch (rel/d*) in VS. Otherwise there won't be symbols for the dlls in package,
a and it will create a symcheck bug on re-insertion into VS.
-->
<MicrosoftVisualStudioDiagnosticsUtilitiesVersion>17.13.35723.115</MicrosoftVisualStudioDiagnosticsUtilitiesVersion>
<MicrosoftVisualStudioDiagnosticsUtilitiesVersion>18.0.0-preview-1-10811-208</MicrosoftVisualStudioDiagnosticsUtilitiesVersion>
<MicrosoftVisualStudioEnterpriseAspNetHelper>$(MicrosoftVisualStudioDiagnosticsUtilitiesVersion)</MicrosoftVisualStudioEnterpriseAspNetHelper>
<MicrosoftVisualStudioInteropVersion>17.13.39960</MicrosoftVisualStudioInteropVersion>
<MicrosoftVSTelemetryVersion>17.13.24</MicrosoftVSTelemetryVersion>
Expand All @@ -69,22 +69,24 @@
<SystemComponentModelCompositionVersion>8.0.0</SystemComponentModelCompositionVersion>
<SystemMemoryVersion>4.5.5</SystemMemoryVersion>
<SystemReflectionMetadataVersion>8.0.0</SystemReflectionMetadataVersion>
<TestPlatformExternalsVersion>17.10.0-preview-2-34602-162</TestPlatformExternalsVersion>
<MicrosoftInternalTestPlatformExtensions>17.10.0-preview-2-34602-162</MicrosoftInternalTestPlatformExtensions>
<!-- <TestPlatformExternalsVersion>18.0.0-preview-1-10804-064</TestPlatformExternalsVersion> -->
<TestPlatformExternalsVersion>18.0.0-preview-1-10811-208</TestPlatformExternalsVersion>
<MicrosoftInternalTestPlatformExtensions>18.0.0-preview-1-10811-208</MicrosoftInternalTestPlatformExtensions>
<TestPlatformMSDiaVersion>17.12.35519.223</TestPlatformMSDiaVersion>
<SystemSecurityPrincipalWindowsVersion>5.0.0</SystemSecurityPrincipalWindowsVersion>
<SystemRuntimeCompilerServicesUnsafeVersion>6.1.0</SystemRuntimeCompilerServicesUnsafeVersion>
</PropertyGroup>
<PropertyGroup Label="VSTest test settings">
<!-- Name of the elements must be in sync with test\Microsoft.TestPlatform.TestUtilities\IntegrationTestBase.cs -->
<AwesomeAssertionsVersion>8.1.0</AwesomeAssertionsVersion>
<MicrosoftTestingPlatformVersion>1.7.2</MicrosoftTestingPlatformVersion>
<MoqVersion>4.16.1</MoqVersion>
<!-- For coverage use our own package on latest stable -->
<MicrosoftCodeCoverageVersion>17.9.0</MicrosoftCodeCoverageVersion>
<!-- These versions are used for running unit tests, and running acceptance tests. They are also used as the default version for projects
in TestAssets.sln to allow running and debugging tests in that solution directly in VS without having to run them via AcceptanceTests. -->
<MSTestTestFrameworkVersion>3.4.3</MSTestTestFrameworkVersion>
<MSTestTestAdapterVersion>3.4.3</MSTestTestAdapterVersion>
<MSTestTestFrameworkVersion>3.9.3</MSTestTestFrameworkVersion>
<MSTestTestAdapterVersion>3.9.3</MSTestTestAdapterVersion>
<MSTestAssertExtensionVersion>1.0.3-preview</MSTestAssertExtensionVersion>
<XUnitFrameworkVersion>2.4.2</XUnitFrameworkVersion>
<XUnitAdapterVersion>2.4.5</XUnitAdapterVersion>
Expand All @@ -98,8 +100,8 @@
These versions need to be "statically" readable because we read this file as xml in our build and tests.
-->
<!-- <MSTestFrameworkLatestVersion></MSTestFrameworkLatestVersion> is not here, because we don't build MSTest locally, so we don't have access to the latest version. -->
<MSTestFrameworkLatestPreviewVersion>[3.4.3]</MSTestFrameworkLatestPreviewVersion>
<MSTestFrameworkLatestStableVersion>[3.4.3]</MSTestFrameworkLatestStableVersion>
<MSTestFrameworkLatestPreviewVersion>[3.9.3]</MSTestFrameworkLatestPreviewVersion>
<MSTestFrameworkLatestStableVersion>[3.9.3]</MSTestFrameworkLatestStableVersion>
<MSTestFrameworkRecentStableVersion>[3.3.1]</MSTestFrameworkRecentStableVersion>
<MSTestFrameworkMostDownloadedVersion>[2.2.10]</MSTestFrameworkMostDownloadedVersion>
<MSTestFrameworkPreviousStableVersion>[2.2.10]</MSTestFrameworkPreviousStableVersion>
Expand Down
2 changes: 1 addition & 1 deletion src/vstest/eng/common/CIBuild.cmd
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
@echo off
powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0Build.ps1""" -restore -build -test -sign -pack -publish -ci %*"
powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0Build.ps1""" -restore -build -test -sign -pack -publish -ci %*"
11 changes: 10 additions & 1 deletion src/vstest/eng/common/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Param(
[string] $msbuildEngine = $null,
[bool] $warnAsError = $true,
[bool] $nodeReuse = $true,
[switch] $buildCheck = $false,
[switch][Alias('r')]$restore,
[switch] $deployDeps,
[switch][Alias('b')]$build,
Expand All @@ -20,6 +21,7 @@ Param(
[switch] $publish,
[switch] $clean,
[switch][Alias('pb')]$productBuild,
[switch]$fromVMR,
[switch][Alias('bl')]$binaryLog,
[switch][Alias('nobl')]$excludeCIBinarylog,
[switch] $ci,
Expand Down Expand Up @@ -71,6 +73,9 @@ function Print-Usage() {
Write-Host " -msbuildEngine <value> Msbuild engine to use to run build ('dotnet', 'vs', or unspecified)."
Write-Host " -excludePrereleaseVS Set to exclude build engines in prerelease versions of Visual Studio"
Write-Host " -nativeToolsOnMachine Sets the native tools on machine environment variable (indicating that the script should use native tools on machine)"
Write-Host " -nodeReuse <value> Sets nodereuse msbuild parameter ('true' or 'false')"
Write-Host " -buildCheck Sets /check msbuild parameter"
Write-Host " -fromVMR Set when building from within the VMR"
Write-Host ""

Write-Host "Command line arguments not listed above are passed thru to msbuild."
Expand All @@ -97,6 +102,7 @@ function Build {

$bl = if ($binaryLog) { '/bl:' + (Join-Path $LogDir 'Build.binlog') } else { '' }
$platformArg = if ($platform) { "/p:Platform=$platform" } else { '' }
$check = if ($buildCheck) { '/check' } else { '' }

if ($projects) {
# Re-assign properties to a new variable because PowerShell doesn't let us append properties directly for unclear reasons.
Expand All @@ -113,6 +119,7 @@ function Build {
MSBuild $toolsetBuildProj `
$bl `
$platformArg `
$check `
/p:Configuration=$configuration `
/p:RepoRoot=$RepoRoot `
/p:Restore=$restore `
Expand All @@ -122,11 +129,13 @@ function Build {
/p:Deploy=$deploy `
/p:Test=$test `
/p:Pack=$pack `
/p:DotNetBuildRepo=$productBuild `
/p:DotNetBuild=$productBuild `
/p:DotNetBuildFromVMR=$fromVMR `
/p:IntegrationTest=$integrationTest `
/p:PerformanceTest=$performanceTest `
/p:Sign=$sign `
/p:Publish=$publish `
/p:RestoreStaticGraphEnableBinaryLogger=$binaryLog `
@properties
}

Expand Down
33 changes: 25 additions & 8 deletions src/vstest/eng/common/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ usage()
echo " --prepareMachine Prepare machine for CI run, clean up processes after build"
echo " --nodeReuse <value> Sets nodereuse msbuild parameter ('true' or 'false')"
echo " --warnAsError <value> Sets warnaserror msbuild parameter ('true' or 'false')"
echo " --buildCheck <value> Sets /check msbuild parameter"
echo " --fromVMR Set when building from within the VMR"
echo ""
echo "Command line arguments not listed above are passed thru to msbuild."
echo "Arguments can also be passed in with a single hyphen."
Expand All @@ -63,6 +65,7 @@ restore=false
build=false
source_build=false
product_build=false
from_vmr=false
rebuild=false
test=false
integration_test=false
Expand All @@ -76,6 +79,7 @@ clean=false

warn_as_error=true
node_reuse=true
build_check=false
binary_log=false
exclude_ci_binary_log=false
pipelines_log=false
Expand All @@ -87,7 +91,7 @@ verbosity='minimal'
runtime_source_feed=''
runtime_source_feed_key=''

properties=''
properties=()
while [[ $# > 0 ]]; do
opt="$(echo "${1/#--/-}" | tr "[:upper:]" "[:lower:]")"
case "$opt" in
Expand Down Expand Up @@ -127,19 +131,22 @@ while [[ $# > 0 ]]; do
-pack)
pack=true
;;
-sourcebuild|-sb)
-sourcebuild|-source-build|-sb)
build=true
source_build=true
product_build=true
restore=true
pack=true
;;
-productBuild|-pb)
-productbuild|-product-build|-pb)
build=true
product_build=true
restore=true
pack=true
;;
-fromvmr|-from-vmr)
from_vmr=true
;;
-test|-t)
test=true
;;
Expand Down Expand Up @@ -173,6 +180,9 @@ while [[ $# > 0 ]]; do
node_reuse=$2
shift
;;
-buildcheck)
build_check=true
;;
-runtimesourcefeed)
runtime_source_feed=$2
shift
Expand All @@ -182,7 +192,7 @@ while [[ $# > 0 ]]; do
shift
;;
*)
properties="$properties $1"
properties+=("$1")
;;
esac

Expand Down Expand Up @@ -216,31 +226,38 @@ function Build {
InitializeCustomToolset

if [[ ! -z "$projects" ]]; then
properties="$properties /p:Projects=$projects"
properties+=("/p:Projects=$projects")
fi

local bl=""
if [[ "$binary_log" == true ]]; then
bl="/bl:\"$log_dir/Build.binlog\""
fi

local check=""
if [[ "$build_check" == true ]]; then
check="/check"
fi

MSBuild $_InitializeToolset \
$bl \
$check \
/p:Configuration=$configuration \
/p:RepoRoot="$repo_root" \
/p:Restore=$restore \
/p:Build=$build \
/p:DotNetBuildRepo=$product_build \
/p:ArcadeBuildFromSource=$source_build \
/p:DotNetBuild=$product_build \
/p:DotNetBuildSourceOnly=$source_build \
/p:DotNetBuildFromVMR=$from_vmr \
/p:Rebuild=$rebuild \
/p:Test=$test \
/p:Pack=$pack \
/p:IntegrationTest=$integration_test \
/p:PerformanceTest=$performance_test \
/p:Sign=$sign \
/p:Publish=$publish \
$properties
/p:RestoreStaticGraphEnableBinaryLogger=$binary_log \
${properties[@]+"${properties[@]}"}

ExitWithExitCode 0
}
Expand Down
2 changes: 1 addition & 1 deletion src/vstest/eng/common/cibuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ while [[ -h $source ]]; do
done
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"

. "$scriptroot/build.sh" --restore --build --test --pack --publish --ci $@
. "$scriptroot/build.sh" --restore --build --test --pack --publish --ci $@
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy