diff --git a/.gitignore b/.gitignore
index 74094e8ce1..f4dfe3f130 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,6 +8,7 @@
.vs/
*.VC.db
.venv/
+build.slnx
# Build results
[Aa]rtifacts/
diff --git a/Directory.Build.props b/Directory.Build.props
index b225f2f659..41c85d2542 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -9,8 +9,11 @@
Latest
4
true
+ false
true
<_SkipUpgradeNetAnalyzersNuGetWarning>true
+ false
+ false
@@ -33,6 +36,8 @@
-->
+ $([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src'))
+ $([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src', 'tests'))
$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'dotnet-test'))
@@ -72,4 +77,13 @@
net8.0
+
+ $(RepoRoot).dotnet-test\
+ HKEY_LOCAL_MACHINE\SOFTWARE
+
+
+
+ $(RepoRoot).dotnet-test\x86\
+ HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node
+
diff --git a/NuGet.config b/NuGet.config
index 324bea91ab..2dc10a79b4 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -7,7 +7,7 @@
-
+
diff --git a/THIRD-PARTY-NOTICES.TXT b/THIRD-PARTY-NOTICES.TXT
index 3bf4c6fc0c..da0d78931d 100644
--- a/THIRD-PARTY-NOTICES.TXT
+++ b/THIRD-PARTY-NOTICES.TXT
@@ -1559,7 +1559,7 @@ SOFTWARE.
-------------------------------------------------
-Source in src/Microsoft.Diagnostics.TestHelpers/Xunit.Extensions/* is largely derived from source
+Source in src/tests/Microsoft.Diagnostics.TestHelpers/Xunit.Extensions/* is largely derived from source
source found at https://github.com/xunit/samples.xunit.
This set of code is covered by the following license:
diff --git a/build.proj b/build.proj
index 642962000e..49c72dc7f1 100644
--- a/build.proj
+++ b/build.proj
@@ -4,5 +4,4 @@
-
diff --git a/documentation/building/windows-instructions.md b/documentation/building/windows-instructions.md
index 7ba560b536..888caaf75c 100644
--- a/documentation/building/windows-instructions.md
+++ b/documentation/building/windows-instructions.md
@@ -111,10 +111,11 @@ test.cmd
## Loading solution file
-For a better dev inner loop experience, load `build.sln` at the root of the repository into either VS or VSCode.
-
-This file is generated from the `build.proj` traversal project and can be regenerated/updated using:
+For a better dev inner loop experience, generate the `build.slnx` file using
```pwsh
-./eng/generate-sln.ps1
+# Ensure local .dotnet is bootstrapped first (run build.cmd once if new clone)
+./eng/generate-slnx.ps1
```
+
+then load the file into either VS or VSCode.
diff --git a/eng/Version.Details.props b/eng/Version.Details.props
index 600df683a0..dffd39389a 100644
--- a/eng/Version.Details.props
+++ b/eng/Version.Details.props
@@ -14,22 +14,22 @@ This file should be imported by eng/Versions.props
1.0.105-preview.225
10.0.2
- 10.0.2-servicing.25601.110
- 5.0.0-2.25601.110
- 5.0.0-2.25601.110
- 5.0.0-2.25601.110
+ 10.0.2-servicing.25603.103
+ 5.0.0-2.25603.103
+ 5.0.0-2.25603.103
+ 5.0.0-2.25603.103
10.0.102
- 10.0.0-beta.25601.110
- 10.0.0-beta.25601.110
- 10.0.102-servicing.25601.110
+ 10.0.0-beta.25603.103
+ 10.0.0-beta.25603.103
+ 10.0.102-servicing.25603.103
10.0.2
- 10.0.2-servicing.25601.110
- 10.0.2-servicing.25601.110
- 10.0.2-servicing.25601.110
- 10.0.2-servicing.25601.110
- 10.0.2-servicing.25601.110
- 10.0.2-servicing.25601.110
- 10.0.2-servicing.25601.110
+ 10.0.2-servicing.25603.103
+ 10.0.2-servicing.25603.103
+ 10.0.2-servicing.25603.103
+ 10.0.2-servicing.25603.103
+ 10.0.2-servicing.25603.103
+ 10.0.2-servicing.25603.103
+ 10.0.2-servicing.25603.103
7.0.0-beta.22316.2
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 1021d2fe52..4d073c2f0c 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -19,31 +19,31 @@
-
+
https://github.com/dotnet/dotnet
- 7dedd35363daf74f94a980da38f2cf4dc86cc23a
+ 5ddd0ddc0ebadca21645a05c419ed5a034454605
-
+
https://github.com/dotnet/dotnet
- 7dedd35363daf74f94a980da38f2cf4dc86cc23a
+ 5ddd0ddc0ebadca21645a05c419ed5a034454605
https://github.com/dotnet/arcade
ccfe6da198c5f05534863bbb1bff66e830e0c6ab
-
+
https://github.com/dotnet/dotnet
- 7dedd35363daf74f94a980da38f2cf4dc86cc23a
+ 5ddd0ddc0ebadca21645a05c419ed5a034454605
-
+
https://github.com/dotnet/dotnet
- 7dedd35363daf74f94a980da38f2cf4dc86cc23a
+ 5ddd0ddc0ebadca21645a05c419ed5a034454605
https://github.com/dotnet/dotnet
- 7dedd35363daf74f94a980da38f2cf4dc86cc23a
+ 5ddd0ddc0ebadca21645a05c419ed5a034454605
https://github.com/dotnet/dotnet
- 7dedd35363daf74f94a980da38f2cf4dc86cc23a
+ 5ddd0ddc0ebadca21645a05c419ed5a034454605
-
+
https://github.com/dotnet/dotnet
- 7dedd35363daf74f94a980da38f2cf4dc86cc23a
+ 5ddd0ddc0ebadca21645a05c419ed5a034454605
-
+
https://github.com/dotnet/dotnet
- 7dedd35363daf74f94a980da38f2cf4dc86cc23a
+ 5ddd0ddc0ebadca21645a05c419ed5a034454605
-
+
https://github.com/dotnet/dotnet
- 7dedd35363daf74f94a980da38f2cf4dc86cc23a
+ 5ddd0ddc0ebadca21645a05c419ed5a034454605
-
+
https://github.com/dotnet/dotnet
- 7dedd35363daf74f94a980da38f2cf4dc86cc23a
+ 5ddd0ddc0ebadca21645a05c419ed5a034454605
-
+
https://github.com/dotnet/dotnet
- 7dedd35363daf74f94a980da38f2cf4dc86cc23a
+ 5ddd0ddc0ebadca21645a05c419ed5a034454605
-
+
https://github.com/dotnet/dotnet
- 7dedd35363daf74f94a980da38f2cf4dc86cc23a
+ 5ddd0ddc0ebadca21645a05c419ed5a034454605
-
+
https://github.com/dotnet/dotnet
- 7dedd35363daf74f94a980da38f2cf4dc86cc23a
+ 5ddd0ddc0ebadca21645a05c419ed5a034454605
-
+
https://github.com/dotnet/dotnet
- 7dedd35363daf74f94a980da38f2cf4dc86cc23a
+ 5ddd0ddc0ebadca21645a05c419ed5a034454605
-
+
https://github.com/dotnet/dotnet
- 7dedd35363daf74f94a980da38f2cf4dc86cc23a
+ 5ddd0ddc0ebadca21645a05c419ed5a034454605
-
+
https://github.com/dotnet/dotnet
- 7dedd35363daf74f94a980da38f2cf4dc86cc23a
+ 5ddd0ddc0ebadca21645a05c419ed5a034454605
https://github.com/dotnet/dotnet
- 7dedd35363daf74f94a980da38f2cf4dc86cc23a
+ 5ddd0ddc0ebadca21645a05c419ed5a034454605
diff --git a/eng/build.ps1 b/eng/build.ps1
index 15f2d14f7e..effd57112b 100644
--- a/eng/build.ps1
+++ b/eng/build.ps1
@@ -8,6 +8,7 @@ Param(
[switch] $privatebuild,
[switch] $ci,
[switch][Alias('bl')]$binaryLog,
+ [switch] $skiptest,
[switch] $skipmanaged,
[switch] $skipnative,
[switch] $bundletools,
@@ -67,6 +68,10 @@ if (-not $skipnative) {
# Install sdk for building, restore and build managed components.
if (-not $skipmanaged) {
+ if ($skiptest) {
+ $remainingargs = "/p:SkipTests=true " + $remainingargs
+ }
+
Invoke-Expression "& `"$engroot\common\build.ps1`" -configuration $configuration -verbosity $verbosity $bl /p:TargetOS=$os /p:TargetArch=$architecture /p:TestArchitectures=$architecture $remainingargs"
if ($lastExitCode -ne 0) {
@@ -111,7 +116,8 @@ if ($test) {
/p:DotnetRuntimeDownloadVersion="$dotnetruntimedownloadversion" `
/p:RuntimeSourceFeed="$runtimesourcefeed" `
/p:RuntimeSourceFeedKey="$runtimesourcefeedkey" `
- /p:LiveRuntimeDir="$liveRuntimeDir"
+ /p:LiveRuntimeDir="$liveRuntimeDir" `
+ /p:IsTestRun=true
if ($lastExitCode -ne 0) {
exit $lastExitCode
diff --git a/eng/build.sh b/eng/build.sh
index e84a3eb197..1372352f6b 100755
--- a/eng/build.sh
+++ b/eng/build.sh
@@ -29,6 +29,7 @@ __SkipGenerateVersion=0
__InstallRuntimes=0
__PrivateBuild=0
__Test=0
+__TestBuild=1
__UnprocessedBuildArgs=
__UseCdac=0
__LiveRuntimeDir=
@@ -105,6 +106,10 @@ handle_arguments() {
__Test=1
;;
+ skiptest|-skiptest)
+ __TestBuild=0
+ ;;
+
usecdac|-usecdac)
__UseCdac=1
;;
@@ -219,6 +224,11 @@ if [[ "$__ManagedBuild" == 1 ]]; then
# __CommonMSBuildArgs contains TargetOS property
echo "Commencing managed build for $__BuildType in $__RootBinDir/bin"
+
+ if [[ "$__TestBuild" != 1 ]]; then
+ __ManagedBuildArgs="$__ManagedBuildArgs /p:SkipTests=true"
+ fi
+
"$__RepoRootDir/eng/common/build.sh" \
--configuration "$__BuildType" \
/p:TargetArch="$__TargetArch" \
@@ -251,7 +261,7 @@ if [[ "$__InstallRuntimes" == 1 || "$__PrivateBuild" == 1 ]]; then
/p:TargetArch="$__TargetArch" \
/p:TargetRid="$__TargetRid" \
/p:TestArchitectures="$__TargetArch" \
- /p:LiveRuntimeDir="$__LiveRuntimeDir"
+ /p:LiveRuntimeDir="$__LiveRuntimeDir"
fi
#
@@ -314,6 +324,8 @@ if [[ "$__Test" == 1 ]]; then
/p:RuntimeSourceFeed="$__RuntimeSourceFeed" \
/p:RuntimeSourceFeedKey="$__RuntimeSourceFeedKey" \
/p:LiveRuntimeDir="$__LiveRuntimeDir" \
+ /p:IsTestRun=true \
+ $__ManagedBuildArgs \
$__CommonMSBuildArgs
if [ $? != 0 ]; then
diff --git a/eng/generate-slnx.ps1 b/eng/generate-slnx.ps1
new file mode 100644
index 0000000000..b3ba58c748
--- /dev/null
+++ b/eng/generate-slnx.ps1
@@ -0,0 +1,112 @@
+#!/usr/bin/env pwsh
+
+<#
+.SYNOPSIS
+ Generates and migrates Visual Studio solution files for the diagnostics repository.
+
+.DESCRIPTION
+ This script generates solution files using SlnGen tool and migrates the legacy
+ build.sln file to the new .slnx format, then cleans up the old file.
+
+.EXAMPLE
+ .\generate-slnx.ps1
+#>
+
+[CmdletBinding()]
+param()
+
+Set-StrictMode -Version Latest
+$ErrorActionPreference = "Stop"
+
+# Determine local dotnet path (must exist)
+$scriptRoot = Split-Path -Parent $MyInvocation.MyCommand.Path
+$localDotNet = Join-Path $scriptRoot "../.dotnet"
+$dotnetExe = Join-Path $localDotNet "dotnet.exe"
+if (-not (Test-Path $dotnetExe)) {
+ Write-Host "[ERROR] Local dotnet not found at $dotnetExe" -ForegroundColor Red
+ Write-Host "Ensure .dotnet is bootstrapped (e.g. run build/restore scripts) before running this generator." -ForegroundColor Yellow
+ exit 1
+}
+
+function Write-Step {
+ param([string]$Message)
+ Write-Host "==> $Message" -ForegroundColor Cyan
+}
+
+function Write-Success {
+ param([string]$Message)
+ Write-Host "[SUCCESS] $Message" -ForegroundColor Green
+}
+
+function Write-Warning {
+ param([string]$Message)
+ Write-Host "[WARNING] $Message" -ForegroundColor Yellow
+}
+
+function Write-ErrorMessage {
+ param([string]$Message)
+ Write-Host "[ERROR] $Message" -ForegroundColor Red
+}
+
+try {
+ Write-Host "Diagnostics Solution Generator" -ForegroundColor Magenta
+ Write-Host "==============================" -ForegroundColor Magenta
+
+ # Step 1: Generate solution files with SlnGen
+ Write-Step "Generating solution files with SlnGen..."
+ try {
+ # Use local dotnet to execute SlnGen tool
+ & $dotnetExe tool exec Microsoft.VisualStudio.SlnGen.Tool --collapsefolders true --folders true --launch false
+ $slngenExit = $LASTEXITCODE
+ if ($slngenExit -ne 0) {
+ throw "SlnGen tool exited with non-zero exit code $slngenExit"
+ }
+ Write-Success "Solution files generated successfully"
+ }
+ catch {
+ Write-ErrorMessage "Failed to generate solution files with SlnGen"
+ Write-Host "Error details: $($_.Exception.Message)" -ForegroundColor Red
+ exit 1
+ }
+
+ # Step 2: Check if build.sln exists before migration
+ if (Test-Path "build.sln") {
+ Write-Step "Migrating build.sln to new format..."
+ try {
+ & $dotnetExe sln build.sln migrate
+ $migrateExit = $LASTEXITCODE
+ if ($migrateExit -ne 0) { throw "dotnet sln migrate exited with $migrateExit" }
+ Write-Success "Migration completed successfully"
+ }
+ catch {
+ Write-ErrorMessage "Failed to migrate build.sln"
+ Write-Host "Error details: $($_.Exception.Message)" -ForegroundColor Red
+ Write-Warning "Continuing with cleanup..."
+ }
+
+ # Step 3: Clean up old solution file
+ Write-Step "Cleaning up old build.sln file..."
+ try {
+ Remove-Item "build.sln" -Force
+ Write-Success "Old solution file removed"
+ }
+ catch {
+ Write-Warning "Could not remove build.sln: $($_.Exception.Message)"
+ Write-Host "You may need to remove it manually" -ForegroundColor Yellow
+ }
+ }
+ else {
+ Write-Warning "build.sln not found, skipping migration step"
+ }
+
+ Write-Host ""
+ Write-Success "Solution generation and migration completed successfully!"
+ Write-Host "You can now open the generated build.slnx files in Visual Studio." -ForegroundColor Gray
+}
+catch {
+ Write-ErrorMessage "Script execution failed with unexpected error"
+ Write-Host "Error details: $($_.Exception.Message)" -ForegroundColor Red
+ Write-Host "Stack trace:" -ForegroundColor Gray
+ Write-Host $_.ScriptStackTrace -ForegroundColor Gray
+ exit 1
+}
diff --git a/eng/pipelines/build.yml b/eng/pipelines/build.yml
index ba061cc2f2..e29e275e45 100644
--- a/eng/pipelines/build.yml
+++ b/eng/pipelines/build.yml
@@ -130,7 +130,8 @@ jobs:
- _PhaseName: ${{ coalesce(parameters.name, parameters.osGroup) }}_${{ config.architecture }}_${{ config.configuration }}
- _Pipeline_StreamDumpDir: $(Build.SourcesDirectory)/artifacts/tmp/${{ config.configuration }}/streams
- - _TestArgs: '-test'
+ - _RunTestArgs: '-test'
+ - _BuildTestArgs: ''
- _Cross: ''
- ${{ if eq(parameters.osGroup, 'Windows_NT') }}:
@@ -142,10 +143,10 @@ jobs:
'error, testOnly and buildOnly cannot be true at the same time': error
- ${{ if eq(parameters.testOnly, 'true') }}:
- - _TestArgs: '-test -skipnative'
+ - _BuildTestArgs: '-skipnative'
- ${{ if or(eq(parameters.buildOnly, 'true'), eq(parameters.isCodeQLRun, 'true')) }}:
- - _TestArgs: ''
+ - _BuildTestArgs: '-skiptest'
# For testing msrc's and service releases. The RuntimeSourceVersion is either "default" or the service release version to test
- _InternalInstallArgs: ''
@@ -185,18 +186,28 @@ jobs:
-binaryLog
-configuration ${{ config.configuration }}
-architecture ${{ config.architecture }}
- $(_TestArgs)
+ $(_BuildTestArgs)
$(_Cross)
$(_InternalInstallArgs)
/p:OfficialBuildId=$(BUILD.BUILDNUMBER)
${{ if eq(parameters.testOnly, 'true') }}:
- displayName: Test
- ${{ elseif eq(parameters.buildOnly, 'true') }}:
- displayName: Build
+ displayName: Build Tests
${{ else }}:
- displayName: Build / Test
+ displayName: Build
condition: succeeded()
+ - ${{ if and(ne(parameters.isCodeQLRun, 'true'), ne(parameters.buildOnly, 'true')) }}:
+ - script: $(_buildScript)
+ -ci
+ -binaryLog
+ -configuration ${{ config.configuration }}
+ -architecture ${{ config.architecture }}
+ $(_RunTestArgs)
+ $(_InternalInstallArgs)
+ /p:OfficialBuildId=$(BUILD.BUILDNUMBER)
+ displayName: Run Tests
+ condition: succeeded()
+
- ${{ if eq(parameters.isCodeQLRun, 'true') }}:
- task: CodeQL3000Finalize@0
displayName: CodeQL Finalize
diff --git a/eng/testsos.cmd b/eng/testsos.cmd
index 949e583534..640638a32d 100644
--- a/eng/testsos.cmd
+++ b/eng/testsos.cmd
@@ -1 +1 @@
-%~dp0..\.dotnet\dotnet.exe test --no-build --logger "console;verbosity=detailed" %~dp0..\src\SOS\SOS.UnitTests\SOS.UnitTests.csproj
+%~dp0..\.dotnet\dotnet.exe test --no-build --logger "console;verbosity=detailed" %~dp0..\src\tests\SOS.UnitTests\SOS.UnitTests.csproj
diff --git a/eng/testsos.sh b/eng/testsos.sh
index 273455e2fd..aa911d7a16 100755
--- a/eng/testsos.sh
+++ b/eng/testsos.sh
@@ -14,4 +14,4 @@ done
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
export LLDB_PATH=/usr/bin/lldb
-$scriptroot/../.dotnet/dotnet test --no-build --logger "console;verbosity=detailed" $scriptroot/../src/SOS/SOS.UnitTests/SOS.UnitTests.csproj
+$scriptroot/../.dotnet/dotnet test --no-build --logger "console;verbosity=detailed" $scriptroot/../src/tests/SOS.UnitTests/SOS.UnitTests.csproj
diff --git a/eng/testsoscdac.cmd b/eng/testsoscdac.cmd
index 17f025b0c8..c499ffaecb 100644
--- a/eng/testsoscdac.cmd
+++ b/eng/testsoscdac.cmd
@@ -1,2 +1,2 @@
set SOS_TEST_CDAC=true
-%~dp0..\.dotnet\dotnet.exe test --no-build --logger "console;verbosity=detailed" %~dp0..\src\SOS\SOS.UnitTests\SOS.UnitTests.csproj --filter "Category=CDACCompatible"
+%~dp0..\.dotnet\dotnet.exe test --no-build --logger "console;verbosity=detailed" %~dp0..\src\tests\SOS.UnitTests\SOS.UnitTests.csproj --filter "Category=CDACCompatible"
diff --git a/eng/testsoscdac.sh b/eng/testsoscdac.sh
index 4bad4dd7b4..bafe751021 100644
--- a/eng/testsoscdac.sh
+++ b/eng/testsoscdac.sh
@@ -15,4 +15,4 @@ done
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
export LLDB_PATH=/usr/bin/lldb
export SOS_TEST_CDAC=true
-$scriptroot/../.dotnet/dotnet test --no-build --logger "console;verbosity=detailed" $scriptroot/../src/SOS/SOS.UnitTests/SOS.UnitTests.csproj --filter "Category=CDACCompatible"
+$scriptroot/../.dotnet/dotnet test --no-build --logger "console;verbosity=detailed" $scriptroot/../src/tests/SOS.UnitTests/SOS.UnitTests.csproj --filter "Category=CDACCompatible"
diff --git a/generate-slnx.ps1 b/generate-slnx.ps1
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/global.json b/global.json
index 4827c55875..f6eb7542fc 100644
--- a/global.json
+++ b/global.json
@@ -18,6 +18,6 @@
"msbuild-sdks": {
"Microsoft.Build.NoTargets": "3.5.0",
"Microsoft.Build.Traversal": "3.4.0",
- "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25601.110"
+ "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25603.103"
}
}
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index bcc839a522..9cc90dbd49 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -7,3 +7,4 @@ endif (CLR_CMAKE_HOST_UNIX)
add_subdirectory(shared)
add_subdirectory(SOS)
add_subdirectory(dbgshim)
+add_subdirectory(tests)
diff --git a/src/Directory.Build.props b/src/Directory.Build.props
index c2d80f41ed..228d65b259 100644
--- a/src/Directory.Build.props
+++ b/src/Directory.Build.props
@@ -2,11 +2,9 @@
- false
- false
true
- true
true
+ true
$(ArtifactsDir)bundledtools/
diff --git a/src/SOS/CMakeLists.txt b/src/SOS/CMakeLists.txt
index 901a26e428..63bf347e73 100644
--- a/src/SOS/CMakeLists.txt
+++ b/src/SOS/CMakeLists.txt
@@ -7,16 +7,9 @@ endif(CLR_CMAKE_HOST_UNIX)
# lldbplugin doesn't build with these options
if(CLR_CMAKE_HOST_WIN32)
message(STATUS "CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION: ${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}")
-
message(STATUS "VSInstallDir: $ENV{VSInstallDir}")
include_directories("$ENV{VSInstallDir}/DIA SDK/include")
-
add_compile_options(/Zl) # omit default library name in .OBJ
-
- add_subdirectory(runcommand)
- if(NOT CLR_CMAKE_TARGET_ARCH_ARM)
- add_subdirectory(SOS.UnitTests/Debuggees/DesktopClrHost)
- endif(NOT CLR_CMAKE_TARGET_ARCH_ARM)
endif(CLR_CMAKE_HOST_WIN32)
add_compile_definitions(STRESS_LOG_ANALYZER)
diff --git a/src/SOS/SOS.Hosting/RuntimeWrapper.cs b/src/SOS/SOS.Hosting/RuntimeWrapper.cs
index bfca28db91..ac37d23e01 100644
--- a/src/SOS/SOS.Hosting/RuntimeWrapper.cs
+++ b/src/SOS/SOS.Hosting/RuntimeWrapper.cs
@@ -158,12 +158,13 @@ protected override void Destroy()
}
if (_dacHandle != IntPtr.Zero)
{
- DataTarget.PlatformFunctions.FreeLibrary(_dacHandle);
+ // Previously, the DAC was freed here, but as we transition to the cDAC which uses NativeAOT,
+ // it is no longer possible to free the DAC library when it is using the shimmed cDAC.
_dacHandle = IntPtr.Zero;
}
if (_cdacHandle != IntPtr.Zero)
{
- DataTarget.PlatformFunctions.FreeLibrary(_cdacHandle);
+ // cDAC can not be freed because it is a NativeAOT dll.
_cdacHandle = IntPtr.Zero;
}
if (_dbiHandle != IntPtr.Zero)
diff --git a/src/SOS/SOS.UnitTests/Debuggees/DivZero/DivZero.csproj b/src/SOS/SOS.UnitTests/Debuggees/MiniDumpLocalVarLookup/MiniDumpLocalVarLookup.csproj
similarity index 100%
rename from src/SOS/SOS.UnitTests/Debuggees/DivZero/DivZero.csproj
rename to src/SOS/SOS.UnitTests/Debuggees/MiniDumpLocalVarLookup/MiniDumpLocalVarLookup.csproj
diff --git a/src/SOS/SOS.UnitTests/Debuggees/MiniDumpLocalVarLookup/Program.cs b/src/SOS/SOS.UnitTests/Debuggees/MiniDumpLocalVarLookup/Program.cs
new file mode 100644
index 0000000000..cbea65ad93
--- /dev/null
+++ b/src/SOS/SOS.UnitTests/Debuggees/MiniDumpLocalVarLookup/Program.cs
@@ -0,0 +1,26 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System;
+using System.Diagnostics;
+
+namespace MiniDumpLocalVarLookup;
+
+internal class Program
+{
+ static public void Main()
+ {
+ int intValue = 42;
+ string stringValue = "Hello, World!";
+
+ PrintValues(intValue, stringValue);
+ }
+
+ static void PrintValues(int intValue, string stringValue)
+ {
+ int length = stringValue.Length;
+ Debugger.Break();
+ Console.WriteLine($"intValue: {intValue}");
+ Console.WriteLine($"stringValue: {stringValue} (length = {length})");
+ }
+}
diff --git a/src/dirs.proj b/src/dirs.proj
index 79328cb2ae..7f8bd0b266 100644
--- a/src/dirs.proj
+++ b/src/dirs.proj
@@ -6,25 +6,23 @@
-
+
+
-
-
-
-
-
+
+
-
+
+
-
-
-
-
-
+
+
+
+
diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt
new file mode 100644
index 0000000000..bf31588276
--- /dev/null
+++ b/src/tests/CMakeLists.txt
@@ -0,0 +1,9 @@
+include(${CLR_SHARED_DIR}/shared.cmake)
+
+if(CLR_CMAKE_HOST_WIN32)
+ # test helpers used by SOS tests
+ add_subdirectory(runcommand)
+ if(NOT CLR_CMAKE_TARGET_ARCH_ARM)
+ add_subdirectory(DesktopClrHost)
+ endif(NOT CLR_CMAKE_TARGET_ARCH_ARM)
+endif(CLR_CMAKE_HOST_WIN32)
diff --git a/src/tests/CommonTestRunner/CommonTestRunner.csproj b/src/tests/CommonTestRunner/CommonTestRunner.csproj
index 5c7edce292..3fe4a8a56d 100644
--- a/src/tests/CommonTestRunner/CommonTestRunner.csproj
+++ b/src/tests/CommonTestRunner/CommonTestRunner.csproj
@@ -6,7 +6,13 @@
-
+
+
+
+
+
+
+
diff --git a/src/tests/CommonTestRunner/ConfigFiles/Unix/Debugger.Tests.Config.txt b/src/tests/CommonTestRunner/ConfigFiles/Unix/Debugger.Tests.Config.txt
index d396c30244..263468d643 100644
--- a/src/tests/CommonTestRunner/ConfigFiles/Unix/Debugger.Tests.Config.txt
+++ b/src/tests/CommonTestRunner/ConfigFiles/Unix/Debugger.Tests.Config.txt
@@ -7,7 +7,7 @@
$(ArtifactsDir)/TestResults/$(TargetConfiguration)/common.unittests_$(Timestamp)
ProjectK
- $(RepoRootDir)/src/tests
+ $(RepoRootDir)/src/tests/CommonTestRunner/Debuggees
$(RepoRootDir)/eng/AuxMsbuildFiles
cli
sdk.prebuilt
diff --git a/src/tests/CommonTestRunner/ConfigFiles/Windows/Debugger.Tests.Config.txt b/src/tests/CommonTestRunner/ConfigFiles/Windows/Debugger.Tests.Config.txt
index 8d6532920c..afcc87c07d 100644
--- a/src/tests/CommonTestRunner/ConfigFiles/Windows/Debugger.Tests.Config.txt
+++ b/src/tests/CommonTestRunner/ConfigFiles/Windows/Debugger.Tests.Config.txt
@@ -7,7 +7,7 @@
$(ArtifactsDir)\TestResults\$(TargetConfiguration)\common.unittests_$(Timestamp)
ProjectK
- $(RepoRootDir)\src\tests
+ $(RepoRootDir)\src\tests\CommonTestRunner\Debuggees
$(RepoRootDir)\eng\AuxMsbuildFiles
sdk.prebuilt
$(ArtifactsDir)
diff --git a/src/SOS/SOS.UnitTests/Debuggees/Directory.Build.props b/src/tests/CommonTestRunner/Debuggees/Directory.Build.props
similarity index 67%
rename from src/SOS/SOS.UnitTests/Debuggees/Directory.Build.props
rename to src/tests/CommonTestRunner/Debuggees/Directory.Build.props
index 55c701fd8e..0a9a25f5ef 100644
--- a/src/SOS/SOS.UnitTests/Debuggees/Directory.Build.props
+++ b/src/tests/CommonTestRunner/Debuggees/Directory.Build.props
@@ -1,12 +1,12 @@
-
-
+
false
full
true
false
+ $([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'debuggees', '$(MSBuildProjectName)', '$(Configuration)'))
diff --git a/src/tests/EventPipeTracee/CustomMetrics.cs b/src/tests/CommonTestRunner/Debuggees/EventPipeTracee/CustomMetrics.cs
similarity index 100%
rename from src/tests/EventPipeTracee/CustomMetrics.cs
rename to src/tests/CommonTestRunner/Debuggees/EventPipeTracee/CustomMetrics.cs
diff --git a/src/tests/EventPipeTracee/DuplicateNameMetrics.cs b/src/tests/CommonTestRunner/Debuggees/EventPipeTracee/DuplicateNameMetrics.cs
similarity index 100%
rename from src/tests/EventPipeTracee/DuplicateNameMetrics.cs
rename to src/tests/CommonTestRunner/Debuggees/EventPipeTracee/DuplicateNameMetrics.cs
diff --git a/src/tests/EventPipeTracee/EventPipeTracee.csproj b/src/tests/CommonTestRunner/Debuggees/EventPipeTracee/EventPipeTracee.csproj
similarity index 82%
rename from src/tests/EventPipeTracee/EventPipeTracee.csproj
rename to src/tests/CommonTestRunner/Debuggees/EventPipeTracee/EventPipeTracee.csproj
index 39e40b1eea..3a7e162fd1 100644
--- a/src/tests/EventPipeTracee/EventPipeTracee.csproj
+++ b/src/tests/CommonTestRunner/Debuggees/EventPipeTracee/EventPipeTracee.csproj
@@ -6,7 +6,7 @@
-
+
diff --git a/src/tests/EventPipeTracee/Program.cs b/src/tests/CommonTestRunner/Debuggees/EventPipeTracee/Program.cs
similarity index 100%
rename from src/tests/EventPipeTracee/Program.cs
rename to src/tests/CommonTestRunner/Debuggees/EventPipeTracee/Program.cs
diff --git a/src/tests/ExitCodeTracee/ExitCodeTracee.csproj b/src/tests/CommonTestRunner/Debuggees/ExitCodeTracee/ExitCodeTracee.csproj
similarity index 100%
rename from src/tests/ExitCodeTracee/ExitCodeTracee.csproj
rename to src/tests/CommonTestRunner/Debuggees/ExitCodeTracee/ExitCodeTracee.csproj
diff --git a/src/tests/ExitCodeTracee/Program.cs b/src/tests/CommonTestRunner/Debuggees/ExitCodeTracee/Program.cs
similarity index 100%
rename from src/tests/ExitCodeTracee/Program.cs
rename to src/tests/CommonTestRunner/Debuggees/ExitCodeTracee/Program.cs
diff --git a/src/tests/StackTracee/Program.cs b/src/tests/CommonTestRunner/Debuggees/StackTracee/Program.cs
similarity index 100%
rename from src/tests/StackTracee/Program.cs
rename to src/tests/CommonTestRunner/Debuggees/StackTracee/Program.cs
diff --git a/src/tests/StackTracee/StackTracee.csproj b/src/tests/CommonTestRunner/Debuggees/StackTracee/StackTracee.csproj
similarity index 100%
rename from src/tests/StackTracee/StackTracee.csproj
rename to src/tests/CommonTestRunner/Debuggees/StackTracee/StackTracee.csproj
diff --git a/src/tests/Tracee/Program.cs b/src/tests/CommonTestRunner/Debuggees/Tracee/Program.cs
similarity index 100%
rename from src/tests/Tracee/Program.cs
rename to src/tests/CommonTestRunner/Debuggees/Tracee/Program.cs
diff --git a/src/tests/Tracee/Tracee.csproj b/src/tests/CommonTestRunner/Debuggees/Tracee/Tracee.csproj
similarity index 100%
rename from src/tests/Tracee/Tracee.csproj
rename to src/tests/CommonTestRunner/Debuggees/Tracee/Tracee.csproj
diff --git a/src/tests/DacCompareNativeTypes/DwarfParse.cs b/src/tests/DacCompareNativeTypes/DwarfParse.cs
index 0e3ca4e13f..65de722ed4 100644
--- a/src/tests/DacCompareNativeTypes/DwarfParse.cs
+++ b/src/tests/DacCompareNativeTypes/DwarfParse.cs
@@ -36,7 +36,7 @@ private static void FinishType(Type type)
{
if (type.Parent != null)
{
- Match typeMatch = typeRegEx.Match(type.SourceLine);
+ Match typeMatch = typeRegEx.Match(type.SourceLine ?? string.Empty);
if (typeMatch.Success)
{
diff --git a/src/tests/DbgShim.UnitTests/ConfigFiles/Windows/Debugger.Tests.Config.txt b/src/tests/DbgShim.UnitTests/ConfigFiles/Windows/Debugger.Tests.Config.txt
index 2939f9290e..526f833988 100644
--- a/src/tests/DbgShim.UnitTests/ConfigFiles/Windows/Debugger.Tests.Config.txt
+++ b/src/tests/DbgShim.UnitTests/ConfigFiles/Windows/Debugger.Tests.Config.txt
@@ -2,13 +2,12 @@
$(ArtifactsDir)\dotnet-test
-
$(ArtifactsDir)\bin\Windows_NT.$(TargetArchitecture).$(TargetConfiguration)
$(ArtifactsDir)\TestResults\$(TargetConfiguration)\dbgshim.unittests_$(Timestamp)
ProjectK
- $(RepoRootDir)\src\tests\DbgShim.UnitTests\Debuggees
$(RepoRootDir)\eng\AuxMsbuildFiles
+ $(RepoRootDir)\src\tests\DbgShim.UnitTests\Debuggees
cli
SimpleDebuggee
diff --git a/src/tests/DbgShim.UnitTests/DbgShim.UnitTests.csproj b/src/tests/DbgShim.UnitTests/DbgShim.UnitTests.csproj
index 3e386ce635..9bb29be6ea 100644
--- a/src/tests/DbgShim.UnitTests/DbgShim.UnitTests.csproj
+++ b/src/tests/DbgShim.UnitTests/DbgShim.UnitTests.csproj
@@ -5,15 +5,20 @@
true
$(OutputPath)$(TargetFramework)\Debugger.Tests.Common.txt
1.0.351101
+ true
+ true
+ true
-
+
+
+
-
-
+
+
@@ -27,16 +32,6 @@
-
-
-
-
-
-
-
-
-
-
@@ -77,7 +72,7 @@
-
+
diff --git a/src/tests/DbgShim.UnitTests/Debuggees/Directory.Build.props b/src/tests/DbgShim.UnitTests/Debuggees/Directory.Build.props
index 99ff5a2abb..0a9a25f5ef 100644
--- a/src/tests/DbgShim.UnitTests/Debuggees/Directory.Build.props
+++ b/src/tests/DbgShim.UnitTests/Debuggees/Directory.Build.props
@@ -1,4 +1,16 @@
-
+
+
+ false
+ full
+ true
+ false
+ $([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'debuggees', '$(MSBuildProjectName)', '$(Configuration)'))
+
+
+
+
+
+
diff --git a/src/SOS/SOS.UnitTests/Debuggees/DesktopClrHost/CMakeLists.txt b/src/tests/DesktopClrHost/CMakeLists.txt
similarity index 93%
rename from src/SOS/SOS.UnitTests/Debuggees/DesktopClrHost/CMakeLists.txt
rename to src/tests/DesktopClrHost/CMakeLists.txt
index 567493fa1e..0c2facfd78 100644
--- a/src/SOS/SOS.UnitTests/Debuggees/DesktopClrHost/CMakeLists.txt
+++ b/src/tests/DesktopClrHost/CMakeLists.txt
@@ -2,11 +2,12 @@ project(DesktopClrHost)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
-include_directories(inc)
include_directories("$ENV{VSInstallDir}/DIA SDK/include")
add_definitions(-DUSE_STL)
+add_compile_options(/Zl) # omit default library name in .OBJ
+
set(DESKTOPCLRHOST_SOURCES
DesktopClrHost.cpp
)
diff --git a/src/SOS/SOS.UnitTests/Debuggees/DesktopClrHost/DesktopClrHost.cpp b/src/tests/DesktopClrHost/DesktopClrHost.cpp
similarity index 100%
rename from src/SOS/SOS.UnitTests/Debuggees/DesktopClrHost/DesktopClrHost.cpp
rename to src/tests/DesktopClrHost/DesktopClrHost.cpp
diff --git a/src/tests/Directory.Build.props b/src/tests/Directory.Build.props
index e36d68d633..b5ed35f629 100644
--- a/src/tests/Directory.Build.props
+++ b/src/tests/Directory.Build.props
@@ -1,3 +1,32 @@
-
+
+
+
+
+
+ true
+ true
+
+
+
+ $([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'eng', 'AuxMsbuildFiles'))
+ $([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)', 'Debuggees'))
+ $([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'debuggees'))
+ $([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'packages'))
+ $([MSBuild]::NormalizePath('$(ArtifactsBinDir)', 'Debugger.Tests.Versions.txt'))
+
+
+
+ $(RepoRoot)
+ $(DotNetInstallRoot)
+ $(NuGetPackageRoot)
+ $(AuxMSBuildRootDir)
+ $(ArtifactsBinDir)
+ $(ArtifactsBinNativeDir)
+
+
+
+ true
+ true
+
diff --git a/src/tests/Directory.Build.targets b/src/tests/Directory.Build.targets
new file mode 100644
index 0000000000..230e2a65a1
--- /dev/null
+++ b/src/tests/Directory.Build.targets
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/tests/Grape/Grape.csproj b/src/tests/Grape/Grape.csproj
index f37e603eb4..76be2271ac 100644
--- a/src/tests/Grape/Grape.csproj
+++ b/src/tests/Grape/Grape.csproj
@@ -6,8 +6,8 @@
-
-
+
+
diff --git a/src/tests/Microsoft.Diagnostics.DebugServices.UnitTests/Microsoft.Diagnostics.DebugServices.UnitTests.csproj b/src/tests/Microsoft.Diagnostics.DebugServices.UnitTests/Microsoft.Diagnostics.DebugServices.UnitTests.csproj
index c6efc5cfd9..e7fd0726b9 100644
--- a/src/tests/Microsoft.Diagnostics.DebugServices.UnitTests/Microsoft.Diagnostics.DebugServices.UnitTests.csproj
+++ b/src/tests/Microsoft.Diagnostics.DebugServices.UnitTests/Microsoft.Diagnostics.DebugServices.UnitTests.csproj
@@ -6,28 +6,20 @@
1.0.351101
true
+ true
+ true
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
diff --git a/src/tests/Microsoft.Diagnostics.Monitoring.EventPipe/EventLogsPipelineUnitTests.cs b/src/tests/Microsoft.Diagnostics.Monitoring.EventPipe/EventLogsPipelineUnitTests.cs
index c8ed1e4f24..b087b93833 100644
--- a/src/tests/Microsoft.Diagnostics.Monitoring.EventPipe/EventLogsPipelineUnitTests.cs
+++ b/src/tests/Microsoft.Diagnostics.Monitoring.EventPipe/EventLogsPipelineUnitTests.cs
@@ -278,9 +278,9 @@ private static void ValidateLoggerRemoteCategoryWarningMessage(StreamReader read
Assert.Equal("Warning", result.LogLevel);
Assert.Equal(7, result.EventId);
Assert.Equal("AnotherEventId", result.EventName);
- Assert.Equal(0, result.Scopes.Count);
+ Assert.Empty(result.Scopes);
//We are expecting only the original format
- Assert.Equal(1, result.Arguments.Count);
+ Assert.Single(result.Arguments);
}
private static void ValidateAppLoggerCategoryInformationMessage(StreamReader reader)
@@ -294,9 +294,9 @@ private static void ValidateAppLoggerCategoryInformationMessage(StreamReader rea
Assert.Equal("Information", result.LogLevel);
Assert.Equal(0, result.EventId);
Assert.Equal(string.Empty, result.EventName);
- Assert.Equal(0, result.Scopes.Count);
+ Assert.Empty(result.Scopes);
//We are expecting only the original format
- Assert.Equal(1, result.Arguments.Count);
+ Assert.Single(result.Arguments);
}
private static void ValidateAppLoggerCategoryWarningMessage(StreamReader reader)
@@ -310,9 +310,9 @@ private static void ValidateAppLoggerCategoryWarningMessage(StreamReader reader)
Assert.Equal("Warning", result.LogLevel);
Assert.Equal(5, result.EventId);
Assert.Equal("WarningEventId", result.EventName);
- Assert.Equal(0, result.Scopes.Count);
+ Assert.Empty(result.Scopes);
//We are expecting only the original format
- Assert.Equal(1, result.Arguments.Count);
+ Assert.Single(result.Arguments);
}
private static void ValidateAppLoggerCategoryErrorMessage(StreamReader reader)
@@ -326,9 +326,9 @@ private static void ValidateAppLoggerCategoryErrorMessage(StreamReader reader)
Assert.Equal("Error", result.LogLevel);
Assert.Equal(0, result.EventId);
Assert.Equal(string.Empty, result.EventName);
- Assert.Equal(0, result.Scopes.Count);
+ Assert.Empty(result.Scopes);
//We are expecting only the original format
- Assert.Equal(1, result.Arguments.Count);
+ Assert.Single(result.Arguments);
}
private static void Validate(IDictionary values, params (string key, object value)[] expectedValues)
diff --git a/src/tests/Microsoft.Diagnostics.Monitoring.EventPipe/Microsoft.Diagnostics.Monitoring.EventPipe.UnitTests.csproj b/src/tests/Microsoft.Diagnostics.Monitoring.EventPipe/Microsoft.Diagnostics.Monitoring.EventPipe.UnitTests.csproj
index 8f50320f25..7d44500941 100644
--- a/src/tests/Microsoft.Diagnostics.Monitoring.EventPipe/Microsoft.Diagnostics.Monitoring.EventPipe.UnitTests.csproj
+++ b/src/tests/Microsoft.Diagnostics.Monitoring.EventPipe/Microsoft.Diagnostics.Monitoring.EventPipe.UnitTests.csproj
@@ -5,9 +5,9 @@
-
-
-
+
+
+
diff --git a/src/tests/Microsoft.Diagnostics.Monitoring/Microsoft.Diagnostics.Monitoring.UnitTests.csproj b/src/tests/Microsoft.Diagnostics.Monitoring/Microsoft.Diagnostics.Monitoring.UnitTests.csproj
index 599592baf7..e7bb6394da 100644
--- a/src/tests/Microsoft.Diagnostics.Monitoring/Microsoft.Diagnostics.Monitoring.UnitTests.csproj
+++ b/src/tests/Microsoft.Diagnostics.Monitoring/Microsoft.Diagnostics.Monitoring.UnitTests.csproj
@@ -5,9 +5,9 @@
-
-
-
+
+
+
diff --git a/src/tests/Microsoft.Diagnostics.NETCore.Client/Microsoft.Diagnostics.NETCore.Client.UnitTests.csproj b/src/tests/Microsoft.Diagnostics.NETCore.Client/Microsoft.Diagnostics.NETCore.Client.UnitTests.csproj
index 0737076d0e..30562d9f87 100644
--- a/src/tests/Microsoft.Diagnostics.NETCore.Client/Microsoft.Diagnostics.NETCore.Client.UnitTests.csproj
+++ b/src/tests/Microsoft.Diagnostics.NETCore.Client/Microsoft.Diagnostics.NETCore.Client.UnitTests.csproj
@@ -5,9 +5,9 @@
-
-
-
+
+
+
diff --git a/src/Microsoft.Diagnostics.TestHelpers/AcquireDotNetTestStep.cs b/src/tests/Microsoft.Diagnostics.TestHelpers/AcquireDotNetTestStep.cs
similarity index 100%
rename from src/Microsoft.Diagnostics.TestHelpers/AcquireDotNetTestStep.cs
rename to src/tests/Microsoft.Diagnostics.TestHelpers/AcquireDotNetTestStep.cs
diff --git a/src/Microsoft.Diagnostics.TestHelpers/AssertX.cs b/src/tests/Microsoft.Diagnostics.TestHelpers/AssertX.cs
similarity index 100%
rename from src/Microsoft.Diagnostics.TestHelpers/AssertX.cs
rename to src/tests/Microsoft.Diagnostics.TestHelpers/AssertX.cs
diff --git a/src/Microsoft.Diagnostics.TestHelpers/BaseDebuggeeCompiler.cs b/src/tests/Microsoft.Diagnostics.TestHelpers/BaseDebuggeeCompiler.cs
similarity index 100%
rename from src/Microsoft.Diagnostics.TestHelpers/BaseDebuggeeCompiler.cs
rename to src/tests/Microsoft.Diagnostics.TestHelpers/BaseDebuggeeCompiler.cs
diff --git a/src/Microsoft.Diagnostics.TestHelpers/CliDebuggeeCompiler.cs b/src/tests/Microsoft.Diagnostics.TestHelpers/CliDebuggeeCompiler.cs
similarity index 100%
rename from src/Microsoft.Diagnostics.TestHelpers/CliDebuggeeCompiler.cs
rename to src/tests/Microsoft.Diagnostics.TestHelpers/CliDebuggeeCompiler.cs
diff --git a/src/Microsoft.Diagnostics.TestHelpers/ConsoleTestOutputHelper.cs b/src/tests/Microsoft.Diagnostics.TestHelpers/ConsoleTestOutputHelper.cs
similarity index 100%
rename from src/Microsoft.Diagnostics.TestHelpers/ConsoleTestOutputHelper.cs
rename to src/tests/Microsoft.Diagnostics.TestHelpers/ConsoleTestOutputHelper.cs
diff --git a/src/Microsoft.Diagnostics.TestHelpers/CsprojBuildDebuggeeTestStep.cs b/src/tests/Microsoft.Diagnostics.TestHelpers/CsprojBuildDebuggeeTestStep.cs
similarity index 100%
rename from src/Microsoft.Diagnostics.TestHelpers/CsprojBuildDebuggeeTestStep.cs
rename to src/tests/Microsoft.Diagnostics.TestHelpers/CsprojBuildDebuggeeTestStep.cs
diff --git a/src/Microsoft.Diagnostics.TestHelpers/DebuggeeCompiler.cs b/src/tests/Microsoft.Diagnostics.TestHelpers/DebuggeeCompiler.cs
similarity index 100%
rename from src/Microsoft.Diagnostics.TestHelpers/DebuggeeCompiler.cs
rename to src/tests/Microsoft.Diagnostics.TestHelpers/DebuggeeCompiler.cs
diff --git a/src/Microsoft.Diagnostics.TestHelpers/DotNetBuildDebuggeeTestStep.cs b/src/tests/Microsoft.Diagnostics.TestHelpers/DotNetBuildDebuggeeTestStep.cs
similarity index 100%
rename from src/Microsoft.Diagnostics.TestHelpers/DotNetBuildDebuggeeTestStep.cs
rename to src/tests/Microsoft.Diagnostics.TestHelpers/DotNetBuildDebuggeeTestStep.cs
diff --git a/src/Microsoft.Diagnostics.TestHelpers/FileTestOutputHelper.cs b/src/tests/Microsoft.Diagnostics.TestHelpers/FileTestOutputHelper.cs
similarity index 100%
rename from src/Microsoft.Diagnostics.TestHelpers/FileTestOutputHelper.cs
rename to src/tests/Microsoft.Diagnostics.TestHelpers/FileTestOutputHelper.cs
diff --git a/src/Microsoft.Diagnostics.TestHelpers/IProcessLogger.cs b/src/tests/Microsoft.Diagnostics.TestHelpers/IProcessLogger.cs
similarity index 100%
rename from src/Microsoft.Diagnostics.TestHelpers/IProcessLogger.cs
rename to src/tests/Microsoft.Diagnostics.TestHelpers/IProcessLogger.cs
diff --git a/src/Microsoft.Diagnostics.TestHelpers/IndentedTestOutputHelper.cs b/src/tests/Microsoft.Diagnostics.TestHelpers/IndentedTestOutputHelper.cs
similarity index 100%
rename from src/Microsoft.Diagnostics.TestHelpers/IndentedTestOutputHelper.cs
rename to src/tests/Microsoft.Diagnostics.TestHelpers/IndentedTestOutputHelper.cs
diff --git a/src/Microsoft.Diagnostics.TestHelpers/LoggingListener.cs b/src/tests/Microsoft.Diagnostics.TestHelpers/LoggingListener.cs
similarity index 100%
rename from src/Microsoft.Diagnostics.TestHelpers/LoggingListener.cs
rename to src/tests/Microsoft.Diagnostics.TestHelpers/LoggingListener.cs
diff --git a/src/Microsoft.Diagnostics.TestHelpers/Microsoft.Diagnostics.TestHelpers.csproj b/src/tests/Microsoft.Diagnostics.TestHelpers/Microsoft.Diagnostics.TestHelpers.csproj
similarity index 73%
rename from src/Microsoft.Diagnostics.TestHelpers/Microsoft.Diagnostics.TestHelpers.csproj
rename to src/tests/Microsoft.Diagnostics.TestHelpers/Microsoft.Diagnostics.TestHelpers.csproj
index 4e3df14e84..a9fb05848e 100644
--- a/src/Microsoft.Diagnostics.TestHelpers/Microsoft.Diagnostics.TestHelpers.csproj
+++ b/src/tests/Microsoft.Diagnostics.TestHelpers/Microsoft.Diagnostics.TestHelpers.csproj
@@ -19,7 +19,7 @@
-
-
+
+
diff --git a/src/Microsoft.Diagnostics.TestHelpers/MultiplexTestOutputHelper.cs b/src/tests/Microsoft.Diagnostics.TestHelpers/MultiplexTestOutputHelper.cs
similarity index 100%
rename from src/Microsoft.Diagnostics.TestHelpers/MultiplexTestOutputHelper.cs
rename to src/tests/Microsoft.Diagnostics.TestHelpers/MultiplexTestOutputHelper.cs
diff --git a/src/Microsoft.Diagnostics.TestHelpers/PrebuiltDebuggeeCompiler.cs b/src/tests/Microsoft.Diagnostics.TestHelpers/PrebuiltDebuggeeCompiler.cs
similarity index 100%
rename from src/Microsoft.Diagnostics.TestHelpers/PrebuiltDebuggeeCompiler.cs
rename to src/tests/Microsoft.Diagnostics.TestHelpers/PrebuiltDebuggeeCompiler.cs
diff --git a/src/Microsoft.Diagnostics.TestHelpers/ProcessRunner.cs b/src/tests/Microsoft.Diagnostics.TestHelpers/ProcessRunner.cs
similarity index 100%
rename from src/Microsoft.Diagnostics.TestHelpers/ProcessRunner.cs
rename to src/tests/Microsoft.Diagnostics.TestHelpers/ProcessRunner.cs
diff --git a/src/Microsoft.Diagnostics.TestHelpers/RemoteExecutorHelper.cs b/src/tests/Microsoft.Diagnostics.TestHelpers/RemoteExecutorHelper.cs
similarity index 100%
rename from src/Microsoft.Diagnostics.TestHelpers/RemoteExecutorHelper.cs
rename to src/tests/Microsoft.Diagnostics.TestHelpers/RemoteExecutorHelper.cs
diff --git a/src/Microsoft.Diagnostics.TestHelpers/SdkPrebuiltDebuggeeCompiler.cs b/src/tests/Microsoft.Diagnostics.TestHelpers/SdkPrebuiltDebuggeeCompiler.cs
similarity index 83%
rename from src/Microsoft.Diagnostics.TestHelpers/SdkPrebuiltDebuggeeCompiler.cs
rename to src/tests/Microsoft.Diagnostics.TestHelpers/SdkPrebuiltDebuggeeCompiler.cs
index ebc4105d43..1caef7c7a0 100644
--- a/src/Microsoft.Diagnostics.TestHelpers/SdkPrebuiltDebuggeeCompiler.cs
+++ b/src/tests/Microsoft.Diagnostics.TestHelpers/SdkPrebuiltDebuggeeCompiler.cs
@@ -26,14 +26,14 @@ public SdkPrebuiltDebuggeeCompiler(TestConfiguration config, string debuggeeName
// The layout is how the current .NET Core SDK layouts the binaries out:
// Source Path: //[]
- // Binary Path: /bin///
- // Binary Exe Path: /bin////.dll
+ // Binary Path: /bin/debuggees///
+ // Binary Exe Path: /bin/debuggees////.dll
_sourcePath = Path.Combine(config.DebuggeeSourceRoot, debuggeeName);
if (Directory.Exists(Path.Combine(_sourcePath, debuggeeName)))
{
_sourcePath = Path.Combine(_sourcePath, debuggeeName);
}
- _binaryPath = Path.Combine(config.DebuggeeBuildRoot, "bin", debuggeeName, config.TargetConfiguration, config.BuildProjectFramework);
+ _binaryPath = Path.Combine(config.DebuggeeBuildRoot, "bin", "debuggees", debuggeeName, config.TargetConfiguration, config.BuildProjectFramework);
_binaryExePath = Path.Combine(_binaryPath, debuggeeName) + (config.IsDesktop ? ".exe" : ".dll");
}
diff --git a/src/Microsoft.Diagnostics.TestHelpers/TestConfiguration.cs b/src/tests/Microsoft.Diagnostics.TestHelpers/TestConfiguration.cs
similarity index 99%
rename from src/Microsoft.Diagnostics.TestHelpers/TestConfiguration.cs
rename to src/tests/Microsoft.Diagnostics.TestHelpers/TestConfiguration.cs
index 01821e3244..5d3fc3436b 100644
--- a/src/Microsoft.Diagnostics.TestHelpers/TestConfiguration.cs
+++ b/src/tests/Microsoft.Diagnostics.TestHelpers/TestConfiguration.cs
@@ -80,7 +80,8 @@ private void ParseConfigFile(string path)
["TargetRid"] = GetRid(),
["TargetArchitecture"] = OS.TargetArchitecture.ToString().ToLowerInvariant(),
["NuGetPackageCacheDir"] = nugetPackages,
- ["TestCDAC"] = Environment.GetEnvironmentVariable("SOS_TEST_CDAC")
+ ["TestCDAC"] = Environment.GetEnvironmentVariable("SOS_TEST_CDAC"),
+ ["DotNetRoot"] = Environment.GetEnvironmentVariable("DOTNET_ROOT"),
};
if (OS.Kind == OSKind.Windows)
{
diff --git a/src/Microsoft.Diagnostics.TestHelpers/TestHost/TestDataReader.cs b/src/tests/Microsoft.Diagnostics.TestHelpers/TestHost/TestDataReader.cs
similarity index 100%
rename from src/Microsoft.Diagnostics.TestHelpers/TestHost/TestDataReader.cs
rename to src/tests/Microsoft.Diagnostics.TestHelpers/TestHost/TestDataReader.cs
diff --git a/src/Microsoft.Diagnostics.TestHelpers/TestHost/TestDataWriter.cs b/src/tests/Microsoft.Diagnostics.TestHelpers/TestHost/TestDataWriter.cs
similarity index 100%
rename from src/Microsoft.Diagnostics.TestHelpers/TestHost/TestDataWriter.cs
rename to src/tests/Microsoft.Diagnostics.TestHelpers/TestHost/TestDataWriter.cs
diff --git a/src/Microsoft.Diagnostics.TestHelpers/TestHost/TestDump.cs b/src/tests/Microsoft.Diagnostics.TestHelpers/TestHost/TestDump.cs
similarity index 100%
rename from src/Microsoft.Diagnostics.TestHelpers/TestHost/TestDump.cs
rename to src/tests/Microsoft.Diagnostics.TestHelpers/TestHost/TestDump.cs
diff --git a/src/Microsoft.Diagnostics.TestHelpers/TestHost/TestHost.cs b/src/tests/Microsoft.Diagnostics.TestHelpers/TestHost/TestHost.cs
similarity index 100%
rename from src/Microsoft.Diagnostics.TestHelpers/TestHost/TestHost.cs
rename to src/tests/Microsoft.Diagnostics.TestHelpers/TestHost/TestHost.cs
diff --git a/src/Microsoft.Diagnostics.TestHelpers/TestOutputProcessLogger.cs b/src/tests/Microsoft.Diagnostics.TestHelpers/TestOutputProcessLogger.cs
similarity index 100%
rename from src/Microsoft.Diagnostics.TestHelpers/TestOutputProcessLogger.cs
rename to src/tests/Microsoft.Diagnostics.TestHelpers/TestOutputProcessLogger.cs
diff --git a/src/Microsoft.Diagnostics.TestHelpers/TestRunner.cs b/src/tests/Microsoft.Diagnostics.TestHelpers/TestRunner.cs
similarity index 100%
rename from src/Microsoft.Diagnostics.TestHelpers/TestRunner.cs
rename to src/tests/Microsoft.Diagnostics.TestHelpers/TestRunner.cs
diff --git a/src/Microsoft.Diagnostics.TestHelpers/TestStep.cs b/src/tests/Microsoft.Diagnostics.TestHelpers/TestStep.cs
similarity index 100%
rename from src/Microsoft.Diagnostics.TestHelpers/TestStep.cs
rename to src/tests/Microsoft.Diagnostics.TestHelpers/TestStep.cs
diff --git a/src/Microsoft.Diagnostics.TestHelpers/Xunit.Extensions/SkipTestException.cs b/src/tests/Microsoft.Diagnostics.TestHelpers/Xunit.Extensions/SkipTestException.cs
similarity index 100%
rename from src/Microsoft.Diagnostics.TestHelpers/Xunit.Extensions/SkipTestException.cs
rename to src/tests/Microsoft.Diagnostics.TestHelpers/Xunit.Extensions/SkipTestException.cs
diff --git a/src/Microsoft.Diagnostics.TestHelpers/Xunit.Extensions/SkippableFactAttribute.cs b/src/tests/Microsoft.Diagnostics.TestHelpers/Xunit.Extensions/SkippableFactAttribute.cs
similarity index 100%
rename from src/Microsoft.Diagnostics.TestHelpers/Xunit.Extensions/SkippableFactAttribute.cs
rename to src/tests/Microsoft.Diagnostics.TestHelpers/Xunit.Extensions/SkippableFactAttribute.cs
diff --git a/src/Microsoft.Diagnostics.TestHelpers/Xunit.Extensions/SkippableFactDiscoverer.cs b/src/tests/Microsoft.Diagnostics.TestHelpers/Xunit.Extensions/SkippableFactDiscoverer.cs
similarity index 100%
rename from src/Microsoft.Diagnostics.TestHelpers/Xunit.Extensions/SkippableFactDiscoverer.cs
rename to src/tests/Microsoft.Diagnostics.TestHelpers/Xunit.Extensions/SkippableFactDiscoverer.cs
diff --git a/src/Microsoft.Diagnostics.TestHelpers/Xunit.Extensions/SkippableFactMessageBus.cs b/src/tests/Microsoft.Diagnostics.TestHelpers/Xunit.Extensions/SkippableFactMessageBus.cs
similarity index 100%
rename from src/Microsoft.Diagnostics.TestHelpers/Xunit.Extensions/SkippableFactMessageBus.cs
rename to src/tests/Microsoft.Diagnostics.TestHelpers/Xunit.Extensions/SkippableFactMessageBus.cs
diff --git a/src/Microsoft.Diagnostics.TestHelpers/Xunit.Extensions/SkippableFactTestCase.cs b/src/tests/Microsoft.Diagnostics.TestHelpers/Xunit.Extensions/SkippableFactTestCase.cs
similarity index 100%
rename from src/Microsoft.Diagnostics.TestHelpers/Xunit.Extensions/SkippableFactTestCase.cs
rename to src/tests/Microsoft.Diagnostics.TestHelpers/Xunit.Extensions/SkippableFactTestCase.cs
diff --git a/src/Microsoft.Diagnostics.TestHelpers/Xunit.Extensions/SkippableTheoryAttribute.cs b/src/tests/Microsoft.Diagnostics.TestHelpers/Xunit.Extensions/SkippableTheoryAttribute.cs
similarity index 100%
rename from src/Microsoft.Diagnostics.TestHelpers/Xunit.Extensions/SkippableTheoryAttribute.cs
rename to src/tests/Microsoft.Diagnostics.TestHelpers/Xunit.Extensions/SkippableTheoryAttribute.cs
diff --git a/src/Microsoft.Diagnostics.TestHelpers/Xunit.Extensions/SkippableTheoryDiscoverer.cs b/src/tests/Microsoft.Diagnostics.TestHelpers/Xunit.Extensions/SkippableTheoryDiscoverer.cs
similarity index 100%
rename from src/Microsoft.Diagnostics.TestHelpers/Xunit.Extensions/SkippableTheoryDiscoverer.cs
rename to src/tests/Microsoft.Diagnostics.TestHelpers/Xunit.Extensions/SkippableTheoryDiscoverer.cs
diff --git a/src/Microsoft.Diagnostics.TestHelpers/Xunit.Extensions/SkippableTheoryTestCase.cs b/src/tests/Microsoft.Diagnostics.TestHelpers/Xunit.Extensions/SkippableTheoryTestCase.cs
similarity index 100%
rename from src/Microsoft.Diagnostics.TestHelpers/Xunit.Extensions/SkippableTheoryTestCase.cs
rename to src/tests/Microsoft.Diagnostics.TestHelpers/Xunit.Extensions/SkippableTheoryTestCase.cs
diff --git a/src/tests/Microsoft.FileFormats.UnitTests/Microsoft.FileFormats.UnitTests.csproj b/src/tests/Microsoft.FileFormats.UnitTests/Microsoft.FileFormats.UnitTests.csproj
index 35b78f4be7..7e7c1fab17 100644
--- a/src/tests/Microsoft.FileFormats.UnitTests/Microsoft.FileFormats.UnitTests.csproj
+++ b/src/tests/Microsoft.FileFormats.UnitTests/Microsoft.FileFormats.UnitTests.csproj
@@ -3,64 +3,20 @@
$(NetCoreAppMinTargetFramework)
;1591;1701
+
-
+
-
- PreserveNewest
-
-
- Always
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
+
+
-
-
+
+ TestBinaries\%(RecursiveDir)%(Filename)%(Extension)
+ PreserveNewest
+
-
diff --git a/src/tests/Microsoft.SymbolStore.UnitTests/Microsoft.SymbolStore.UnitTests.csproj b/src/tests/Microsoft.SymbolStore.UnitTests/Microsoft.SymbolStore.UnitTests.csproj
index b3a103a3fa..c55575ccf7 100644
--- a/src/tests/Microsoft.SymbolStore.UnitTests/Microsoft.SymbolStore.UnitTests.csproj
+++ b/src/tests/Microsoft.SymbolStore.UnitTests/Microsoft.SymbolStore.UnitTests.csproj
@@ -5,16 +5,12 @@
-
-
-
-
-
+
-
-
+
+
@@ -22,94 +18,12 @@
-
- PreserveNewest
-
-
-
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
+
+ TestBinaries\%(RecursiveDir)%(Filename)%(Extension)
PreserveNewest
-
+
+ TestBinaries\%(RecursiveDir)%(Filename)%(Extension)
PreserveNewest
diff --git a/src/SOS/SOS.UnitTests/ConfigFiles/Unix/Debugger.Tests.Config.txt b/src/tests/SOS.UnitTests/ConfigFiles/Unix/Debugger.Tests.Config.txt
similarity index 98%
rename from src/SOS/SOS.UnitTests/ConfigFiles/Unix/Debugger.Tests.Config.txt
rename to src/tests/SOS.UnitTests/ConfigFiles/Unix/Debugger.Tests.Config.txt
index 698895147d..d3649f1d09 100644
--- a/src/SOS/SOS.UnitTests/ConfigFiles/Unix/Debugger.Tests.Config.txt
+++ b/src/tests/SOS.UnitTests/ConfigFiles/Unix/Debugger.Tests.Config.txt
@@ -13,7 +13,7 @@
ProjectK
- $(RepoRootDir)/src/SOS/SOS.UnitTests/Scripts
+ $(ArtifactsDir)/bin/SOS.UnitTests/Scripts
$(ArtifactsDir)/bin/$(OS).$(TargetArchitecture).$(TargetConfiguration)
$(ArtifactsDir)/TestResults/$(TargetConfiguration)/sos.unittests_$(Timestamp)
$(ArtifactsDir)/tmp/$(TargetConfiguration)\dumps
@@ -27,7 +27,7 @@
true
false
- $(RepoRootDir)/src/SOS/SOS.UnitTests/Debuggees
+ $(RepoRootDir)/src/tests/SOS.UnitTests/Debuggees
$(RepoRootDir)/eng/AuxMsbuildFiles
sdk.prebuilt
$(ArtifactsDir)
diff --git a/src/SOS/SOS.UnitTests/ConfigFiles/Windows/Debugger.Tests.Config.txt b/src/tests/SOS.UnitTests/ConfigFiles/Windows/Debugger.Tests.Config.txt
similarity index 98%
rename from src/SOS/SOS.UnitTests/ConfigFiles/Windows/Debugger.Tests.Config.txt
rename to src/tests/SOS.UnitTests/ConfigFiles/Windows/Debugger.Tests.Config.txt
index 1639348111..ab01a5ce7d 100644
--- a/src/SOS/SOS.UnitTests/ConfigFiles/Windows/Debugger.Tests.Config.txt
+++ b/src/tests/SOS.UnitTests/ConfigFiles/Windows/Debugger.Tests.Config.txt
@@ -12,7 +12,7 @@
$(ArtifactsDir)\dotnet-test
- $(RepoRootDir)\src\SOS\SOS.UnitTests\Scripts
+ $(ArtifactsDir)\bin\SOS.UnitTests\Scripts
$(ArtifactsDir)\bin\Windows_NT.$(TargetArchitecture).$(TargetConfiguration)
$(ArtifactsDir)\TestResults\$(TargetConfiguration)\sos.unittests_$(Timestamp)
$(ArtifactsDir)\tmp\$(TargetConfiguration)\dumps
@@ -36,7 +36,7 @@
$(WinDir)\Microsoft.Net\Framework64\v4.0.30319\
$(WinDir)\Microsoft.Net\Framework\v4.0.30319\
- $(RepoRootDir)\src\SOS\SOS.UnitTests\Debuggees
+ $(RepoRootDir)\src\tests\SOS.UnitTests\Debuggees
$(RepoRootDir)\eng\AuxMsbuildFiles
sdk.prebuilt
$(ArtifactsDir)
diff --git a/src/tests/SOS.UnitTests/Debuggees/Directory.Build.props b/src/tests/SOS.UnitTests/Debuggees/Directory.Build.props
new file mode 100644
index 0000000000..0a9a25f5ef
--- /dev/null
+++ b/src/tests/SOS.UnitTests/Debuggees/Directory.Build.props
@@ -0,0 +1,16 @@
+
+
+
+
+ false
+ full
+ true
+ false
+ $([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'debuggees', '$(MSBuildProjectName)', '$(Configuration)'))
+
+
+
+
+
+
+
diff --git a/src/SOS/SOS.UnitTests/Debuggees/DivZero/DivZero.cs b/src/tests/SOS.UnitTests/Debuggees/DivZero/DivZero.cs
similarity index 100%
rename from src/SOS/SOS.UnitTests/Debuggees/DivZero/DivZero.cs
rename to src/tests/SOS.UnitTests/Debuggees/DivZero/DivZero.cs
diff --git a/src/SOS/SOS.UnitTests/Debuggees/DotnetDumpCommands/DotnetDumpCommands.csproj b/src/tests/SOS.UnitTests/Debuggees/DivZero/DivZero.csproj
similarity index 100%
rename from src/SOS/SOS.UnitTests/Debuggees/DotnetDumpCommands/DotnetDumpCommands.csproj
rename to src/tests/SOS.UnitTests/Debuggees/DivZero/DivZero.csproj
diff --git a/src/SOS/SOS.UnitTests/Debuggees/DumpGCData/DumpGCData.csproj b/src/tests/SOS.UnitTests/Debuggees/DotnetDumpCommands/DotnetDumpCommands.csproj
similarity index 100%
rename from src/SOS/SOS.UnitTests/Debuggees/DumpGCData/DumpGCData.csproj
rename to src/tests/SOS.UnitTests/Debuggees/DotnetDumpCommands/DotnetDumpCommands.csproj
diff --git a/src/SOS/SOS.UnitTests/Debuggees/DotnetDumpCommands/Program.cs b/src/tests/SOS.UnitTests/Debuggees/DotnetDumpCommands/Program.cs
similarity index 100%
rename from src/SOS/SOS.UnitTests/Debuggees/DotnetDumpCommands/Program.cs
rename to src/tests/SOS.UnitTests/Debuggees/DotnetDumpCommands/Program.cs
diff --git a/src/SOS/SOS.UnitTests/Debuggees/FindRootsOlderGeneration/FindRootsOlderGeneration.csproj b/src/tests/SOS.UnitTests/Debuggees/DumpGCData/DumpGCData.csproj
similarity index 100%
rename from src/SOS/SOS.UnitTests/Debuggees/FindRootsOlderGeneration/FindRootsOlderGeneration.csproj
rename to src/tests/SOS.UnitTests/Debuggees/DumpGCData/DumpGCData.csproj
diff --git a/src/SOS/SOS.UnitTests/Debuggees/DumpGCData/Program.cs b/src/tests/SOS.UnitTests/Debuggees/DumpGCData/Program.cs
similarity index 100%
rename from src/SOS/SOS.UnitTests/Debuggees/DumpGCData/Program.cs
rename to src/tests/SOS.UnitTests/Debuggees/DumpGCData/Program.cs
diff --git a/src/SOS/SOS.UnitTests/Debuggees/DynamicMethod/DynamicMethod.csproj b/src/tests/SOS.UnitTests/Debuggees/DynamicMethod/DynamicMethod.csproj
similarity index 100%
rename from src/SOS/SOS.UnitTests/Debuggees/DynamicMethod/DynamicMethod.csproj
rename to src/tests/SOS.UnitTests/Debuggees/DynamicMethod/DynamicMethod.csproj
diff --git a/src/SOS/SOS.UnitTests/Debuggees/DynamicMethod/Program.cs b/src/tests/SOS.UnitTests/Debuggees/DynamicMethod/Program.cs
similarity index 100%
rename from src/SOS/SOS.UnitTests/Debuggees/DynamicMethod/Program.cs
rename to src/tests/SOS.UnitTests/Debuggees/DynamicMethod/Program.cs
diff --git a/src/SOS/SOS.UnitTests/Debuggees/GCPOH/GCPOH.csproj b/src/tests/SOS.UnitTests/Debuggees/FindRootsOlderGeneration/FindRootsOlderGeneration.csproj
similarity index 100%
rename from src/SOS/SOS.UnitTests/Debuggees/GCPOH/GCPOH.csproj
rename to src/tests/SOS.UnitTests/Debuggees/FindRootsOlderGeneration/FindRootsOlderGeneration.csproj
diff --git a/src/SOS/SOS.UnitTests/Debuggees/FindRootsOlderGeneration/Program.cs b/src/tests/SOS.UnitTests/Debuggees/FindRootsOlderGeneration/Program.cs
similarity index 100%
rename from src/SOS/SOS.UnitTests/Debuggees/FindRootsOlderGeneration/Program.cs
rename to src/tests/SOS.UnitTests/Debuggees/FindRootsOlderGeneration/Program.cs
diff --git a/src/SOS/SOS.UnitTests/Debuggees/GCPOH/GCPOH.cs b/src/tests/SOS.UnitTests/Debuggees/GCPOH/GCPOH.cs
similarity index 100%
rename from src/SOS/SOS.UnitTests/Debuggees/GCPOH/GCPOH.cs
rename to src/tests/SOS.UnitTests/Debuggees/GCPOH/GCPOH.cs
diff --git a/src/SOS/SOS.UnitTests/Debuggees/GCWhere/GCWhere.csproj b/src/tests/SOS.UnitTests/Debuggees/GCPOH/GCPOH.csproj
similarity index 100%
rename from src/SOS/SOS.UnitTests/Debuggees/GCWhere/GCWhere.csproj
rename to src/tests/SOS.UnitTests/Debuggees/GCPOH/GCPOH.csproj
diff --git a/src/SOS/SOS.UnitTests/Debuggees/GCWhere/GCWhere.cs b/src/tests/SOS.UnitTests/Debuggees/GCWhere/GCWhere.cs
similarity index 100%
rename from src/SOS/SOS.UnitTests/Debuggees/GCWhere/GCWhere.cs
rename to src/tests/SOS.UnitTests/Debuggees/GCWhere/GCWhere.cs
diff --git a/src/SOS/SOS.UnitTests/Debuggees/NestedExceptionTest/NestedExceptionTest.csproj b/src/tests/SOS.UnitTests/Debuggees/GCWhere/GCWhere.csproj
similarity index 100%
rename from src/SOS/SOS.UnitTests/Debuggees/NestedExceptionTest/NestedExceptionTest.csproj
rename to src/tests/SOS.UnitTests/Debuggees/GCWhere/GCWhere.csproj
diff --git a/src/SOS/SOS.UnitTests/Debuggees/LineNums/LineNums.csproj b/src/tests/SOS.UnitTests/Debuggees/LineNums/LineNums.csproj
similarity index 100%
rename from src/SOS/SOS.UnitTests/Debuggees/LineNums/LineNums.csproj
rename to src/tests/SOS.UnitTests/Debuggees/LineNums/LineNums.csproj
diff --git a/src/SOS/SOS.UnitTests/Debuggees/LineNums/Program.cs b/src/tests/SOS.UnitTests/Debuggees/LineNums/Program.cs
similarity index 100%
rename from src/SOS/SOS.UnitTests/Debuggees/LineNums/Program.cs
rename to src/tests/SOS.UnitTests/Debuggees/LineNums/Program.cs
diff --git a/src/SOS/SOS.UnitTests/Debuggees/NestedExceptionTest/NestedExceptionTest.cs b/src/tests/SOS.UnitTests/Debuggees/NestedExceptionTest/NestedExceptionTest.cs
similarity index 100%
rename from src/SOS/SOS.UnitTests/Debuggees/NestedExceptionTest/NestedExceptionTest.cs
rename to src/tests/SOS.UnitTests/Debuggees/NestedExceptionTest/NestedExceptionTest.cs
diff --git a/src/SOS/SOS.UnitTests/Debuggees/Overflow/Overflow.csproj b/src/tests/SOS.UnitTests/Debuggees/NestedExceptionTest/NestedExceptionTest.csproj
similarity index 100%
rename from src/SOS/SOS.UnitTests/Debuggees/Overflow/Overflow.csproj
rename to src/tests/SOS.UnitTests/Debuggees/NestedExceptionTest/NestedExceptionTest.csproj
diff --git a/src/SOS/SOS.UnitTests/Debuggees/Overflow/Overflow.cs b/src/tests/SOS.UnitTests/Debuggees/Overflow/Overflow.cs
similarity index 100%
rename from src/SOS/SOS.UnitTests/Debuggees/Overflow/Overflow.cs
rename to src/tests/SOS.UnitTests/Debuggees/Overflow/Overflow.cs
diff --git a/src/SOS/SOS.UnitTests/Debuggees/ReflectionTest/ReflectionTest.csproj b/src/tests/SOS.UnitTests/Debuggees/Overflow/Overflow.csproj
similarity index 100%
rename from src/SOS/SOS.UnitTests/Debuggees/ReflectionTest/ReflectionTest.csproj
rename to src/tests/SOS.UnitTests/Debuggees/Overflow/Overflow.csproj
diff --git a/src/SOS/SOS.UnitTests/Debuggees/ReflectionTest/ReflectionTest.cs b/src/tests/SOS.UnitTests/Debuggees/ReflectionTest/ReflectionTest.cs
similarity index 100%
rename from src/SOS/SOS.UnitTests/Debuggees/ReflectionTest/ReflectionTest.cs
rename to src/tests/SOS.UnitTests/Debuggees/ReflectionTest/ReflectionTest.cs
diff --git a/src/SOS/SOS.UnitTests/Debuggees/SimpleThrow/SimpleThrow.csproj b/src/tests/SOS.UnitTests/Debuggees/ReflectionTest/ReflectionTest.csproj
similarity index 100%
rename from src/SOS/SOS.UnitTests/Debuggees/SimpleThrow/SimpleThrow.csproj
rename to src/tests/SOS.UnitTests/Debuggees/ReflectionTest/ReflectionTest.csproj
diff --git a/src/SOS/SOS.UnitTests/Debuggees/SimpleThrow/SimpleThrow.cs b/src/tests/SOS.UnitTests/Debuggees/SimpleThrow/SimpleThrow.cs
similarity index 100%
rename from src/SOS/SOS.UnitTests/Debuggees/SimpleThrow/SimpleThrow.cs
rename to src/tests/SOS.UnitTests/Debuggees/SimpleThrow/SimpleThrow.cs
diff --git a/src/SOS/SOS.UnitTests/Debuggees/VarargPInvokeInteropMD/VarargPInvokeInteropMD.csproj b/src/tests/SOS.UnitTests/Debuggees/SimpleThrow/SimpleThrow.csproj
similarity index 100%
rename from src/SOS/SOS.UnitTests/Debuggees/VarargPInvokeInteropMD/VarargPInvokeInteropMD.csproj
rename to src/tests/SOS.UnitTests/Debuggees/SimpleThrow/SimpleThrow.csproj
diff --git a/src/SOS/SOS.UnitTests/Debuggees/SimpleThrow/UserObject.cs b/src/tests/SOS.UnitTests/Debuggees/SimpleThrow/UserObject.cs
similarity index 100%
rename from src/SOS/SOS.UnitTests/Debuggees/SimpleThrow/UserObject.cs
rename to src/tests/SOS.UnitTests/Debuggees/SimpleThrow/UserObject.cs
diff --git a/src/SOS/SOS.UnitTests/Debuggees/SymbolTestApp/SymbolTestApp.sln b/src/tests/SOS.UnitTests/Debuggees/SymbolTestApp/SymbolTestApp.sln
similarity index 100%
rename from src/SOS/SOS.UnitTests/Debuggees/SymbolTestApp/SymbolTestApp.sln
rename to src/tests/SOS.UnitTests/Debuggees/SymbolTestApp/SymbolTestApp.sln
diff --git a/src/SOS/SOS.UnitTests/Debuggees/SymbolTestApp/SymbolTestApp/SymbolTestApp.cs b/src/tests/SOS.UnitTests/Debuggees/SymbolTestApp/SymbolTestApp/SymbolTestApp.cs
similarity index 100%
rename from src/SOS/SOS.UnitTests/Debuggees/SymbolTestApp/SymbolTestApp/SymbolTestApp.cs
rename to src/tests/SOS.UnitTests/Debuggees/SymbolTestApp/SymbolTestApp/SymbolTestApp.cs
diff --git a/src/SOS/SOS.UnitTests/Debuggees/SymbolTestApp/SymbolTestApp/SymbolTestApp.csproj b/src/tests/SOS.UnitTests/Debuggees/SymbolTestApp/SymbolTestApp/SymbolTestApp.csproj
similarity index 100%
rename from src/SOS/SOS.UnitTests/Debuggees/SymbolTestApp/SymbolTestApp/SymbolTestApp.csproj
rename to src/tests/SOS.UnitTests/Debuggees/SymbolTestApp/SymbolTestApp/SymbolTestApp.csproj
diff --git a/src/SOS/SOS.UnitTests/Debuggees/SymbolTestApp/SymbolTestDll/SymbolTestDll.csproj b/src/tests/SOS.UnitTests/Debuggees/SymbolTestApp/SymbolTestDll/SymbolTestDll.csproj
similarity index 100%
rename from src/SOS/SOS.UnitTests/Debuggees/SymbolTestApp/SymbolTestDll/SymbolTestDll.csproj
rename to src/tests/SOS.UnitTests/Debuggees/SymbolTestApp/SymbolTestDll/SymbolTestDll.csproj
diff --git a/src/SOS/SOS.UnitTests/Debuggees/SymbolTestApp/SymbolTestDll/TestClass.cs b/src/tests/SOS.UnitTests/Debuggees/SymbolTestApp/SymbolTestDll/TestClass.cs
similarity index 100%
rename from src/SOS/SOS.UnitTests/Debuggees/SymbolTestApp/SymbolTestDll/TestClass.cs
rename to src/tests/SOS.UnitTests/Debuggees/SymbolTestApp/SymbolTestDll/TestClass.cs
diff --git a/src/SOS/SOS.UnitTests/Debuggees/TaskNestedException/RandomUserLibrary/RandomUserLibrary.csproj b/src/tests/SOS.UnitTests/Debuggees/TaskNestedException/RandomUserLibrary/RandomUserLibrary.csproj
similarity index 100%
rename from src/SOS/SOS.UnitTests/Debuggees/TaskNestedException/RandomUserLibrary/RandomUserLibrary.csproj
rename to src/tests/SOS.UnitTests/Debuggees/TaskNestedException/RandomUserLibrary/RandomUserLibrary.csproj
diff --git a/src/SOS/SOS.UnitTests/Debuggees/TaskNestedException/RandomUserLibrary/RandomUserTask.cs b/src/tests/SOS.UnitTests/Debuggees/TaskNestedException/RandomUserLibrary/RandomUserTask.cs
similarity index 100%
rename from src/SOS/SOS.UnitTests/Debuggees/TaskNestedException/RandomUserLibrary/RandomUserTask.cs
rename to src/tests/SOS.UnitTests/Debuggees/TaskNestedException/RandomUserLibrary/RandomUserTask.cs
diff --git a/src/SOS/SOS.UnitTests/Debuggees/TaskNestedException/TaskNestedException.sln b/src/tests/SOS.UnitTests/Debuggees/TaskNestedException/TaskNestedException.sln
similarity index 100%
rename from src/SOS/SOS.UnitTests/Debuggees/TaskNestedException/TaskNestedException.sln
rename to src/tests/SOS.UnitTests/Debuggees/TaskNestedException/TaskNestedException.sln
diff --git a/src/SOS/SOS.UnitTests/Debuggees/TaskNestedException/TaskNestedException/TaskNestedException.cs b/src/tests/SOS.UnitTests/Debuggees/TaskNestedException/TaskNestedException/TaskNestedException.cs
similarity index 100%
rename from src/SOS/SOS.UnitTests/Debuggees/TaskNestedException/TaskNestedException/TaskNestedException.cs
rename to src/tests/SOS.UnitTests/Debuggees/TaskNestedException/TaskNestedException/TaskNestedException.cs
diff --git a/src/SOS/SOS.UnitTests/Debuggees/TaskNestedException/TaskNestedException/TaskNestedException.csproj b/src/tests/SOS.UnitTests/Debuggees/TaskNestedException/TaskNestedException/TaskNestedException.csproj
similarity index 100%
rename from src/SOS/SOS.UnitTests/Debuggees/TaskNestedException/TaskNestedException/TaskNestedException.csproj
rename to src/tests/SOS.UnitTests/Debuggees/TaskNestedException/TaskNestedException/TaskNestedException.csproj
diff --git a/src/SOS/lldbplugin.tests/TestDebuggee/Test.cs b/src/tests/SOS.UnitTests/Debuggees/TestDebuggee/Test.cs
similarity index 100%
rename from src/SOS/lldbplugin.tests/TestDebuggee/Test.cs
rename to src/tests/SOS.UnitTests/Debuggees/TestDebuggee/Test.cs
diff --git a/src/SOS/lldbplugin.tests/TestDebuggee/TestDebuggee.csproj b/src/tests/SOS.UnitTests/Debuggees/TestDebuggee/TestDebuggee.csproj
similarity index 100%
rename from src/SOS/lldbplugin.tests/TestDebuggee/TestDebuggee.csproj
rename to src/tests/SOS.UnitTests/Debuggees/TestDebuggee/TestDebuggee.csproj
diff --git a/src/SOS/SOS.UnitTests/Debuggees/VarargPInvokeInteropMD/Program.cs b/src/tests/SOS.UnitTests/Debuggees/VarargPInvokeInteropMD/Program.cs
similarity index 100%
rename from src/SOS/SOS.UnitTests/Debuggees/VarargPInvokeInteropMD/Program.cs
rename to src/tests/SOS.UnitTests/Debuggees/VarargPInvokeInteropMD/Program.cs
diff --git a/src/tests/SOS.UnitTests/Debuggees/VarargPInvokeInteropMD/VarargPInvokeInteropMD.csproj b/src/tests/SOS.UnitTests/Debuggees/VarargPInvokeInteropMD/VarargPInvokeInteropMD.csproj
new file mode 100644
index 0000000000..644ea7fa32
--- /dev/null
+++ b/src/tests/SOS.UnitTests/Debuggees/VarargPInvokeInteropMD/VarargPInvokeInteropMD.csproj
@@ -0,0 +1,7 @@
+
+
+ Exe
+ $(BuildProjectFramework)
+ $(SupportedSubProcessTargetFrameworks)
+
+
diff --git a/src/SOS/SOS.UnitTests/Debuggees/WebApp3/Program.cs b/src/tests/SOS.UnitTests/Debuggees/WebApp3/Program.cs
similarity index 100%
rename from src/SOS/SOS.UnitTests/Debuggees/WebApp3/Program.cs
rename to src/tests/SOS.UnitTests/Debuggees/WebApp3/Program.cs
diff --git a/src/SOS/SOS.UnitTests/Debuggees/WebApp3/Properties/launchSettings.json b/src/tests/SOS.UnitTests/Debuggees/WebApp3/Properties/launchSettings.json
similarity index 100%
rename from src/SOS/SOS.UnitTests/Debuggees/WebApp3/Properties/launchSettings.json
rename to src/tests/SOS.UnitTests/Debuggees/WebApp3/Properties/launchSettings.json
diff --git a/src/SOS/SOS.UnitTests/Debuggees/WebApp3/Startup.cs b/src/tests/SOS.UnitTests/Debuggees/WebApp3/Startup.cs
similarity index 100%
rename from src/SOS/SOS.UnitTests/Debuggees/WebApp3/Startup.cs
rename to src/tests/SOS.UnitTests/Debuggees/WebApp3/Startup.cs
diff --git a/src/SOS/SOS.UnitTests/Debuggees/WebApp3/WebApp3.csproj b/src/tests/SOS.UnitTests/Debuggees/WebApp3/WebApp3.csproj
similarity index 100%
rename from src/SOS/SOS.UnitTests/Debuggees/WebApp3/WebApp3.csproj
rename to src/tests/SOS.UnitTests/Debuggees/WebApp3/WebApp3.csproj
diff --git a/src/SOS/SOS.UnitTests/Debuggees/WebApp3/appsettings.Development.json b/src/tests/SOS.UnitTests/Debuggees/WebApp3/appsettings.Development.json
similarity index 100%
rename from src/SOS/SOS.UnitTests/Debuggees/WebApp3/appsettings.Development.json
rename to src/tests/SOS.UnitTests/Debuggees/WebApp3/appsettings.Development.json
diff --git a/src/SOS/SOS.UnitTests/Debuggees/WebApp3/appsettings.json b/src/tests/SOS.UnitTests/Debuggees/WebApp3/appsettings.json
similarity index 100%
rename from src/SOS/SOS.UnitTests/Debuggees/WebApp3/appsettings.json
rename to src/tests/SOS.UnitTests/Debuggees/WebApp3/appsettings.json
diff --git a/src/SOS/SOS.UnitTests/DumpGenerationFixture.cs b/src/tests/SOS.UnitTests/DumpGenerationFixture.cs
similarity index 100%
rename from src/SOS/SOS.UnitTests/DumpGenerationFixture.cs
rename to src/tests/SOS.UnitTests/DumpGenerationFixture.cs
diff --git a/src/SOS/SOS.UnitTests/SOS.UnitTests.csproj b/src/tests/SOS.UnitTests/SOS.UnitTests.csproj
similarity index 74%
rename from src/SOS/SOS.UnitTests/SOS.UnitTests.csproj
rename to src/tests/SOS.UnitTests/SOS.UnitTests.csproj
index 913e37d4b7..482ccf20c1 100644
--- a/src/SOS/SOS.UnitTests/SOS.UnitTests.csproj
+++ b/src/tests/SOS.UnitTests/SOS.UnitTests.csproj
@@ -4,7 +4,9 @@
false
;1591;1701
$(DefineConstants);CORE_CLR
+ true
true
+ true
$(OutputPath)$(TargetFramework)\Debugger.Tests.Common.txt
@@ -26,16 +28,13 @@
+
-
-
-
-
-
-
+
+
@@ -62,4 +61,15 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/SOS/SOS.UnitTests/SOS.cs b/src/tests/SOS.UnitTests/SOS.cs
similarity index 93%
rename from src/SOS/SOS.UnitTests/SOS.cs
rename to src/tests/SOS.UnitTests/SOS.cs
index 3a66a4046f..7099fc8d2b 100644
--- a/src/SOS/SOS.UnitTests/SOS.cs
+++ b/src/tests/SOS.UnitTests/SOS.cs
@@ -139,7 +139,9 @@ internal static async Task RunTest(
string testName = null,
bool testLive = true,
bool testDump = true,
- bool testTriage = false)
+ bool testTriage = false,
+ bool testMini = false,
+ SOSRunner.DumpGenerator dumpGenerator = SOSRunner.DumpGenerator.CreateDump)
{
await RunTest(scriptName,
new SOSRunner.TestInformation
@@ -149,7 +151,8 @@ await RunTest(scriptName,
TestLive = testLive,
TestDump = testDump,
DebuggeeName = debuggeeName,
- DumpType = SOSRunner.DumpType.Heap
+ DumpType = SOSRunner.DumpType.Heap,
+ DumpGenerator = dumpGenerator,
},
output);
@@ -165,7 +168,23 @@ await RunTest(scriptName,
TestLive = false,
TestDump = testDump,
DebuggeeName = debuggeeName,
- DumpType = SOSRunner.DumpType.Triage
+ DumpType = SOSRunner.DumpType.Triage,
+ DumpGenerator = dumpGenerator,
+ },
+ output);
+ }
+ if (testMini && !config.PublishSingleFile)
+ {
+ await RunTest(scriptName,
+ new SOSRunner.TestInformation
+ {
+ TestConfiguration = config,
+ TestName = testName,
+ TestLive = false,
+ TestDump = testDump,
+ DebuggeeName = debuggeeName,
+ DumpType = SOSRunner.DumpType.Mini,
+ DumpGenerator = dumpGenerator,
},
output);
}
@@ -234,6 +253,31 @@ public SOS(ITestOutputHelper output)
public static IEnumerable