Skip to content

Conversation

@max-charlamb
Copy link
Member

@max-charlamb max-charlamb commented Aug 28, 2025

This pull request reorganizes and improves the project and build configuration, with a particular focus on test infrastructure and project structure. The changes streamline how test projects are referenced and built, clarify property settings for packaging and shipping, and update solution/project references to reflect a new directory structure for test assets.

Project and Build Configuration Improvements:

  • Added a new dirs.proj traversal project that includes all main diagnostic tool projects and conditionally includes test projects, improving build orchestration and clarity.
    • Added generate-slnx.ps1 script which generates an ephemeral dirs.slnx file which can be opened in VS/VSCode.
    • Updated start-vs.cmd script to automatically call generate-slnx.ps1 if dirs.slnx does not exist.
  • Updated Directory.Build.props to set IsShipping and IsPackable to false by default, and suppress warnings about packing non-packable projects, ensuring that internal/test projects are not accidentally shipped or packed.
  • Added architecture-specific properties for test .NET install roots and registry roots, improving test environment configuration for different target architectures.

Test Infrastructure and Project Structure:

  • Added add_subdirectory(tests) to CMakeLists.txt to ensure that test projects are included in native builds.
  • Corrected a path in THIRD-PARTY-NOTICES.TXT to point to the new location of the Xunit.Extensions code under tests/Microsoft.Diagnostics.TestHelpers, reflecting the directory reorganization.edited version of Move tests and test debuggees to repo root 'tests' directory #5469

** Follow-up Items**

  • Change test project names to be uniform
  • Debugger.Tests.Versions.txt should be in the artifacts tree and drive when runtimes are installed on helix

@max-charlamb max-charlamb marked this pull request as ready for review August 28, 2025 21:46
@max-charlamb max-charlamb requested a review from a team as a code owner August 28, 2025 21:46
@max-charlamb max-charlamb changed the title Prepare tests to run on helix Move tests and test debuggees to repo root 'tests' directory Aug 28, 2025
steveisok
steveisok previously approved these changes Aug 29, 2025
@max-charlamb max-charlamb changed the title Move tests and test debuggees to repo root 'tests' directory Organize tests under src/tests Oct 9, 2025
@max-charlamb max-charlamb changed the title Organize tests under src/tests Organize tests under src/tests Oct 9, 2025
@max-charlamb max-charlamb changed the title Organize tests under src/tests Consolidate tests under src/tests Oct 9, 2025

# Determine local dotnet path (must exist)
$scriptRoot = Split-Path -Parent $MyInvocation.MyCommand.Path
$localDotNet = Join-Path $scriptRoot "../.dotnet"
Copy link
Member

Choose a reason for hiding this comment

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

Use the dotnet script - it guarantees that we download it if it's not there. It hadnles the bootstrap for you. It also handles the case where we don't need to download it if the user has it installed globally.

commit 5de3340
Author: Max Charlamb <[email protected]>
Date:   Fri Dec 5 11:36:00 2025 -0500

    move native SOS test helpers to test folder (dotnet#5652)

    * Moves `runcommand` and `DesktopClrHost` from under the SOS package to
    `src/tests/`

commit d1421e4
Author: Max Charlamb <[email protected]>
Date:   Fri Dec 5 11:35:14 2025 -0500

    add MiniDumpLocalVarLookup test (dotnet#5579)

    * Adds SOS test for minidump local var lookup

commit 848b19c
Author: Max Charlamb <[email protected]>
Date:   Thu Dec 4 22:37:26 2025 -0500

    Simplify test `csproj` files (dotnet#5653)
    * MSBuild property: `$(SrcDir) -> $(RepoRoot)/src/`
    * MSBuild property: `$(TestDir) -> $(ReporRoot/src/tests/`
    * Tests `.csproj` files to use these properties to simplify imports.
    This also allows us to move around the test/src directories without
    modifying each project individually.
    * `Microsoft.FileFormats.UnitTests.csproj` and
    `Microsoft.SymbolStore.UnitTests.csproj` both copy test binary assets
    from the source tree into the artifacts tree. This was handled
    individually for each item with some inconsistencies. I simplified this
    process using globbing. There are a couple more files that are copied
    now, but I believe this shouldn't have any appreciable impact.

commit bc69097
Author: dotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com>
Date:   Thu Dec 4 16:20:38 2025 -0800

    [main] Update dependencies from dotnet/dotnet (dotnet#5650)

    This pull request updates the following dependencies

    [marker]: <> (Begin:9c7d85bb-274e-4ad6-970a-48ffc448929b)
    - **Subscription**:
    [9c7d85bb-274e-4ad6-970a-48ffc448929b](https://maestro.dot.net/subscriptions?search=9c7d85bb-274e-4ad6-970a-48ffc448929b)
    - **Build**:
    [20251203.3](https://dev.azure.com/dnceng/internal/_build/results?buildId=2852778)
    ([293194](https://maestro.dot.net/channel/5173/github:dotnet:dotnet/build/293194))
    - **Date Produced**: December 3, 2025 7:24:47 PM UTC
    - **Commit**:
    [5ddd0ddc0ebadca21645a05c419ed5a034454605](dotnet/dotnet@5ddd0dd)
    - **Branch**:
    [release/10.0.1xx](https://github.com/dotnet/dotnet/tree/release/10.0.1xx)

    [DependencyUpdate]: <> (Begin)

    - **Dependency Updates**:
      - From [10.0.2-servicing.25601.110 to 10.0.2-servicing.25603.103][1]
         - runtime.linux-arm64.Microsoft.DotNet.Cdac.Transport
         - runtime.linux-x64.Microsoft.DotNet.Cdac.Transport
         - runtime.osx-arm64.Microsoft.DotNet.Cdac.Transport
         - runtime.osx-x64.Microsoft.DotNet.Cdac.Transport
         - runtime.win-arm64.Microsoft.DotNet.Cdac.Transport
         - Microsoft.AspNetCore.App.Ref.Internal
         - Microsoft.NETCore.Platforms
         - runtime.win-x64.Microsoft.DotNet.Cdac.Transport
      - From [10.0.2 to 10.0.2][1]
         - Microsoft.AspNetCore.App.Ref
         - Microsoft.NETCore.App.Ref
      - From [5.0.0-2.25601.110 to 5.0.0-2.25603.103][1]
         - Microsoft.CodeAnalysis
         - Microsoft.CodeAnalysis.Analyzers
         - Microsoft.CodeAnalysis.CSharp
      - From [10.0.102 to 10.0.102][1]
         - Microsoft.CodeAnalysis.NetAnalyzers
      - From [10.0.0-beta.25601.110 to 10.0.0-beta.25603.103][1]
         - Microsoft.DotNet.Arcade.Sdk
         - Microsoft.DotNet.CodeAnalysis
    - From [10.0.102-servicing.25601.110 to 10.0.102-servicing.25603.103][1]
         - Microsoft.NET.Sdk

    [1]: dotnet/dotnet@7dedd35...5ddd0dd

    [DependencyUpdate]: <> (End)

    [marker]: <> (End:9c7d85bb-274e-4ad6-970a-48ffc448929b)

    Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>

commit 4ba3f42
Author: Max Charlamb <[email protected]>
Date:   Thu Dec 4 18:53:44 2025 -0500

    Remove references to $(RepoRoot) in testing scripts (dotnet#5614)

    This brings us closer to sending the tests to helix

commit a81816d
Author: Max Charlamb <[email protected]>
Date:   Thu Dec 4 13:29:25 2025 -0500

    move lldbplugin.tests to test folder (dotnet#5651)

commit 94caedf
Author: Max Charlamb <[email protected]>
Date:   Thu Dec 4 13:07:42 2025 -0500

    Remove `FreeLibrary` invocations in managed SOS host (dotnet#5586)

    * Fixes intermittent failures when using the cDAC
    * Prepares SOS to consume NativeAOT packages
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.

5 participants