-
Notifications
You must be signed in to change notification settings - Fork 383
Move tests and test debuggees to repo root 'tests' directory #5554
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
base: main
Are you sure you want to change the base?
Conversation
…es with build in them. Flags as duplicate params
… (NuGet.config, Version.props, and a debuggee Directory.Build.props+targets)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the rationale for moving stuff in \src\tests -> \tests? For example dotnet\runtime or dotnet\aspnetcore both put their tests under the src directory. It seems like this creates a lot of churn and makes our repo different than others.
I'm not necessarily opposed but I do want to understand before we churn 100s of files in the repo versioning history. I just marked request changes to make sure it doesn't get accidentally checked in before we talked about it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we're good now.
<TestDotNetRootDir>$(DotNetInstallRoot)</TestDotNetRootDir> | ||
<TestPackageArtifactsRootDir>$(NuGetPackageRoot)</TestPackageArtifactsRootDir> | ||
<TestAuxMSBuildRootDir>$(AuxMSBuildRootDir)</TestAuxMSBuildRootDir> | ||
<TestVersionConfigDir>$(ArtifactsBinDir)</TestVersionConfigDir> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What causes Debugger.Tests.Versions.txt to be located in the artifacts bin dir? I thought this is a file we create when we install the runtimes to test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since there will be two modes of running tests, it made sense to decouple generating this file from when we install the runtimes. When we build tests for helix, installing runtimes at that point is useless.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple thoughts:
- Could you or Max make a little doc in our repo that describes how we expect the Helix testing to work? I'm hoping this wouldn't need to be more than a few paragraphs describing what assets are going to be put in what places and how are the different pieces going to find what they need. Right now its challenging to reconstruct the high level design intent from the fragments of scripts and paths spread around the repo.
- When we set up a Helix run I assume we have some control over where the runtime gets copied to and where the Debugger.Tests.Versions.txt file gets copied to. Certainly we don't have to put those two things in the same place but is it problematic to do so? The fewer different directories and variables we need the simpler it is to keep track of.
- ArtifactsBinDir initially seems like a surprising place to have the versions file but maybe its just because I don't understand the bigger picture of how the Helix testing is intended to work. I'm trusting once I see how the pieces fit together it will make more sense.
<DotNetRoot Condition="'$(TargetArchitecture)' == 'x86'">$(RepoRootDir)\.dotnet-test\x86</DotNetRoot> | ||
<Import ConfigFile="$(DotNetRoot)\Debugger.Tests.Versions.txt" /> | ||
<DotNetRoot Condition="'$(TestDotNetRoot)' != ''">$(TestDotNetRoot)</DotNetRoot> | ||
<Import ConfigFile="$(TestVersionConfigDir)\Debugger.Tests.Versions.txt" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the SOS tests we assume this file is in DotNetRoot directory. Why have different tests looking in different directories?
(I notice this pattern of parameterizing the DbgShim tests differently than the SOS tests occurs in other places too but I'm guessing there is no benefit to commenting each spot)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We took an earlier commit from #5469 as it started to get too much from one PR. This will be the way we want to have the debugger type tests configured moving forward. DbgShim was the first one and SOS just hadn't been done yet.
It would be easier to leave this change in my opinion as we're going to follow up with similar behavior in the other tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, the differences are because its only partially complete. 👍
<DotNetRoot Condition="'$(TargetArchitecture)' != 'x86'">$(RepoRootDir)\.dotnet-test</DotNetRoot> | ||
<DotNetRoot Condition="'$(TargetArchitecture)' == 'x86'">$(RepoRootDir)\.dotnet-test\x86</DotNetRoot> | ||
<Import ConfigFile="$(DotNetRoot)\Debugger.Tests.Versions.txt" /> | ||
<DotNetRoot Condition="'$(TestDotNetRoot)' != ''">$(TestDotNetRoot)</DotNetRoot> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The SOS tests have hard-coded $(RepoRootDir)/.dotnet-test as DotNetRoot. Any reason DbgShim tests are doing all this parameterization and the SOS tests are essentially hard-coding it? It seems like we'd want all our tests looking for DotNetRoot in the same place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar comment as the one above. The rationale for creating $(TestDotNetRoot)
is local = '.dotnet-test' and helix = 'read from DOTNET_ROOT env variable'. All debugger tests will opt into this behavior.
@@ -1,14 +1,14 @@ | |||
<Configuration> | |||
<Import ConfigFile="Debugger.Tests.Common.txt" /> | |||
<DotNetRoot>$(RepoRootDir)/.dotnet-test</DotNetRoot> | |||
<Import ConfigFile="$(DotNetRoot)/Debugger.Tests.Versions.txt" /> | |||
<DotNetRoot Condition="'$(TestDotNetRoot)' != ''">$(TestDotNetRoot)</DotNetRoot> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume the design intent is that TestDotNetRoot won't be defined when running Helix? Its not yet clear to me why that will be the case, but I'm hoping things will make sense once I've got a better understanding how the Helix run is executed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that's the only thing that can't be relative pathed. When the sdk is sent along, the DOTNET_ROOT env variable is also set. We can just read from the env variable in that case.
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:
Build.proj
traversal project that includes all main diagnostic tool projects and conditionally includes test projects, improving build orchestration and clarity.Directory.Build.props
to setIsShipping
andIsPackable
tofalse
by default, and suppress warnings about packing non-packable projects, ensuring that internal/test projects are not accidentally shipped or packed.Test Infrastructure and Project Structure:
add_subdirectory(tests)
toCMakeLists.txt
to ensure that test projects are included in native builds.debuggees.sln
to reference test debuggee projects from the newtests/Debuggees
directory, and added several new test debuggee projects to the solution.THIRD-PARTY-NOTICES.TXT
to point to the new location of theXunit.Extensions
code undertests/Microsoft.Diagnostics.TestHelpers
, reflecting the directory reorganization.edited version of Move tests and test debuggees to repo root 'tests' directory #5469