Skip to content

Commit

Permalink
Stop emitting weird intermediate folder artifacts/tests/artifacts (do…
Browse files Browse the repository at this point in the history
…tnet#36833)

The logic in dir.common.props for relativizing test directories
doesn't work well for the generated XUnit wrapper csproj files as
these are generated under artifacts\tests. Relativizing this
directory against src\coreclr\tests\src ended up with a weird
sequence that ended up duplicating the tests/artifacts folder
level. I have fixed this by explicitly passing the root directory
for relativization for the XUnit wrapper projects.

Thanks

Tomas

Fixes: dotnet#1655
  • Loading branch information
trylek authored May 21, 2020
1 parent bdc0943 commit 6e30997
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/coreclr/tests/dir.common.props
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<PropertyGroup>
<OSPlatformConfig>$(TargetOS).$(TargetArchitecture).$(Configuration)</OSPlatformConfig>

<TestSrcDir>$(MSBuildThisFileDirectory)src</TestSrcDir>
<TestSrcDir Condition="'$(TestSrcDir)' == ''">$(MSBuildThisFileDirectory)src</TestSrcDir>
<BuildProjectRelativeDir>$([MSBuild]::MakeRelative($(TestSrcDir), $(MSBuildProjectDirectory)))\$(MSBuildProjectName)\</BuildProjectRelativeDir>

<!-- BaseIntermediateOutputPath is used by the SDK as the location
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/tests/src/runtest.proj
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ namespace $([System.String]::Copy($(Category)).Replace(".","_").Replace("\","").
</Target>

<Target Name="CreateAllWrappers" DependsOnTargets="GetListOfTestCmds;FindCmdDirectories">
<MSBuild Projects="$(MSBuildProjectFile)" Targets="CreateXunitWrapper;BuildXunitWrapper" Properties="_CMDDIR=%(TestDirectories.Identity)" />
<MSBuild Projects="$(MSBuildProjectFile)" Targets="CreateXunitWrapper;BuildXunitWrapper" Properties="_CMDDIR=%(TestDirectories.Identity);TestSrcDir=$(XunitTestBinBase)" />
</Target>

<Target Name="GetListOfTestCmds">
Expand Down

0 comments on commit 6e30997

Please sign in to comment.