diff options
author | wtgodbe <wigodbe@microsoft.com> | 2017-03-06 13:44:21 -0800 |
---|---|---|
committer | wtgodbe <wigodbe@microsoft.com> | 2017-03-06 13:51:19 -0800 |
commit | 54d5f431ee2492f8b4f2f12d0b6171c6a846c930 (patch) | |
tree | 29ef15e58cb6a8e3e5c1f7284c952a02869140a0 | |
parent | aeef0d20caceb33c80312fdf40ed242139cdd003 (diff) | |
download | coreclr-54d5f431ee2492f8b4f2f12d0b6171c6a846c930.tar.gz coreclr-54d5f431ee2492f8b4f2f12d0b6171c6a846c930.tar.bz2 coreclr-54d5f431ee2492f8b4f2f12d0b6171c6a846c930.zip |
Create Xunit wrappers for 2nd-level test directories instead of top-level
-rw-r--r-- | tests/helixprep.proj | 2 | ||||
-rw-r--r-- | tests/runtest.proj | 17 | ||||
-rw-r--r-- | tests/tests.targets | 2 |
3 files changed, 13 insertions, 8 deletions
diff --git a/tests/helixprep.proj b/tests/helixprep.proj index 6fa271a23d..0042b3a783 100644 --- a/tests/helixprep.proj +++ b/tests/helixprep.proj @@ -15,7 +15,7 @@ <ItemGroup> <TestCmds Include="$(DiscoveryDirectory)\**\*.cmd" ></TestCmds> - <XunitDlls Include="$(DiscoveryDirectory)\*\*.XUnitWrapper.dll" ></XunitDlls> + <XunitDlls Include="$(DiscoveryDirectory)\**\*.XUnitWrapper.dll" ></XunitDlls> <RequiresSigningFilesToDelete Include="$(DiscoveryDirectory)\**\*.requires_signing" /> </ItemGroup> diff --git a/tests/runtest.proj b/tests/runtest.proj index 45f2bb7702..5b4aa10f4b 100644 --- a/tests/runtest.proj +++ b/tests/runtest.proj @@ -29,10 +29,13 @@ <AllTestDirsPaths Include="@(AllTestDirsNonCanonicalPaths)" > <Path>$([System.IO.Path]::GetFullPath(%(Identity)))</Path> </AllTestDirsPaths> - <NonExcludedTestDirectories Include="@(AllTestDirsPaths -> '%(Path)')" Exclude="@(_SkipTestDir -> '$(XunitTestBinBase)%(Identity)')"> + <NonExcludedTestDirectories Include="@(AllTestDirsPaths -> '%(Path)')" Exclude="@(_SkipTestDir -> '$(XunitTestBinBase)%(Identity)')" /> + <TopLevelDirectories Include="@(NonExcludedTestDirectories)" /> + <SecondLevel Include="$([System.IO.Directory]::GetDirectories(%(TopLevelDirectories.Identity)))" /> + <SecondLevelDirectories Include="@(SecondLevel)"> <Path>$([System.IO.Path]::GetFullPath(%(AllRunnableTestPaths.Identity)))</Path> - </NonExcludedTestDirectories> - <TestDirectoriesWithDup Include="@(NonExcludedTestDirectories -> '%(Identity)')" Condition="$([System.String]::new('%(Path)').StartsWith('%(Identity)'))" /> + </SecondLevelDirectories> + <TestDirectoriesWithDup Include="@(SecondLevelDirectories -> '%(Identity)')" Condition="$([System.String]::new('%(Path)').StartsWith('%(Identity)'))" /> </ItemGroup> @@ -118,7 +121,7 @@ $(_XunitEpilog) </ItemGroup> <Import Project="$(SourceDir)dir.targets" /> <PropertyGroup> - <OutDir>$(XunitTestBinBase)\$(Category)\</OutDir> + <OutDir>$(XunitTestBinBase)\$(CategoryWithSlash)\</OutDir> </PropertyGroup> </Project> ]]> @@ -151,7 +154,9 @@ $(_XunitEpilog) <PropertyGroup> <_CMDDIR_Parent>$([System.IO.Path]::GetDirectoryName($(_CMDDIR)))</_CMDDIR_Parent> - <Category>$([System.String]::Copy('$(_CMDDIR)').Replace($(_CMDDIR_Parent)\,''))</Category> + <_CMDDIR_Grandparent>$([System.IO.Path]::GetDirectoryName($(_CMDDIR_Parent)))</_CMDDIR_Grandparent> + <CategoryWithSlash>$([System.String]::Copy('$(_CMDDIR)').Replace($(_CMDDIR_Grandparent)\,''))</CategoryWithSlash> + <Category>$([System.String]::Copy('$(CategoryWithSlash)').Replace('\','.'))</Category> <XunitWrapper>$(Category).XUnitWrapper</XunitWrapper> <XunitWrapperSrcDir>$(XunitWrapperGeneratedCSDirBase)$(Category)</XunitWrapperSrcDir> <XunitWrapperOutputDir>$(XunitWrapperOutputIntermediatedDirBase)$(Category)</XunitWrapperOutputDir> @@ -435,4 +440,4 @@ namespace $([System.String]::Copy($(Category)).Replace(".","_").Replace("\",""). <Target Name="Clean"> <RemoveDir Condition=" '$(BuildWrappers)'=='true'" Directories="$(XunitWrapperGeneratedCSDirBase);$(XunitWrapperOutputIntermediatedDirBase)" ContinueOnError="WarnAndContinue" /> </Target> -</Project> +</Project>
\ No newline at end of file diff --git a/tests/tests.targets b/tests/tests.targets index 78028cda27..8f00fd7499 100644 --- a/tests/tests.targets +++ b/tests/tests.targets @@ -14,7 +14,7 @@ </PropertyGroup> <Target Name="FindTestDirectories"> <ItemGroup> - <AllTestAssemblies Include="$(BaseOutputPathWithConfig)\*\*.XUnitWrapper.dll" /> + <AllTestAssemblies Include="$(BaseOutputPathWithConfig)\**\*.XUnitWrapper.dll" /> <TestAssemblies Include="@(AllTestAssemblies)" Exclude="@(_SkipTestAssemblies -> '$(TestAssemblyDir)%(Identity)\%(Identity).XUnitWrapper.dll')" /> </ItemGroup> |