Skip to content

Commit

Permalink
Rewrite how superpmicollect sets up its testing to make it more frien…
Browse files Browse the repository at this point in the history
…dly with the dependent project having dependencies (like on the XUnit wrapper generator).
  • Loading branch information
jkoritzinsky committed Nov 16, 2021
1 parent eccf29a commit ccd08a2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
26 changes: 17 additions & 9 deletions src/tests/JIT/superpmi/superpmicollect.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,14 @@
<ItemGroup>
<_SpmiTestProjects Include="..\Performance\CodeQuality\Bytemark\Bytemark.csproj" />
<_SpmiTestProjects Include="..\Methodical\fp\exgen\10w5d_cs_do.csproj" />
<_SpmiTestProjects Update="@(_SpmiTestProjects)">
<Properties>OutputPath=$(OutputPath)\%(FileName)</Properties>
</_SpmiTestProjects>
<ProjectReference Include="@(_SpmiTestProjects)">
<Targets>Build;CreateExecuteScript</Targets>
<OutputItemType>_SpmiTest</OutputItemType>
<TargetPath>%(FileName)</TargetPath>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>

<!-- This target builds the executables and test running scripts for the _SpmiTestProjects
to the output directory of the current project. -->
<Target Name="_BuildSpmiTestProjects" BeforeTargets="Build">
<MSBuild Projects="@(_SpmiTestProjects)" />
</Target>

<!-- _SpmiTestNamesFile contains the file names of the _SpmiTestProjects. -->
<PropertyGroup>
<_SpmiTestNamesFile>$(IntermediateOutputPath)\SpmiTestNames.txt</_SpmiTestNamesFile>
Expand All @@ -55,4 +52,15 @@
<LogicalName>SpmiTestNames</LogicalName>
</EmbeddedResource>
</ItemGroup>

<Target Name="_CopySpmiTestsToOutput" DependsOnTargets="ResolveProjectReferences" BeforeTargets="AssignTargetPaths">
<PropertyGroup>
<_SpmiPathsToCopyPattern>@(_SpmiTest->'%(RootDir)%(Directory)**')</_SpmiPathsToCopyPattern>
</PropertyGroup>
<ItemGroup>
<_SpmiPathsToCopy Include="$(_SpmiPathsToCopyPattern)" />
<_SpmiPathsToCopy DirectoryWithoutSeparator="$([System.IO.Path]::TrimEndingDirectorySeparator('%(Directory)'))" />
</ItemGroup>
<Copy SourceFiles="@(_SpmiPathsToCopy)" DestinationFolder="$([System.IO.Path]::GetDirectoryName('$(OutputPath)'))/$([System.IO.Path]::GetFileName('%(DirectoryWithoutSeparator)'))" SkipUnchangedFiles="True" />
</Target>
</Project>
7 changes: 0 additions & 7 deletions src/tests/JIT/superpmi/superpmicollect.csproj.targets

This file was deleted.

0 comments on commit ccd08a2

Please sign in to comment.