Ignore execution scripts under merged wrappers (#67452)
authorTomáš Rylek <trylek@microsoft.com>
Fri, 1 Apr 2022 23:26:52 +0000 (01:26 +0200)
committerGitHub <noreply@github.com>
Fri, 1 Apr 2022 23:26:52 +0000 (01:26 +0200)
Today logic for emitting the legacy XUnit wrappers is based on
scanning the test output tree for execution scripts (sh / cmd);
we however need to emit execution scripts even in the presence of
merged wrappers in case of tests requiring project isolation.
This change filters these tests out so that they don't end up
creating a spurious legacy XUnit test wrapper.

Thanks

Tomas

src/tests/build.proj

index 593b455..96682b6 100644 (file)
       <AllRunnableTestPaths Include="$(XunitTestBinBase)\**\*.$(TestScriptExtension)"/>
       <AllRunnableTestPaths Remove="$(XunitTestBinBase)\**\run-v8.sh" Condition="'$(TargetArchitecture)' == 'wasm'" />
       <MergedAssemblyMarkerPaths Include="$(XunitTestBinBase)\**\*.MergedTestAssembly"/>
+      <MergedAssemblyFolders Include="$([System.IO.Path]::GetDirectoryName('%(MergedAssemblyMarkerPaths.Identity)'))" />
+      <MergedAssemblyParentFolders Include="$([System.IO.Path]::GetDirectoryName('%(MergedAssemblyFolders.Identity)'))" />
+      <AllRunnableTestPaths Remove="%(MergedAssemblyParentFolders.Identity)\**\*.$(TestScriptExtension)" />
       <MergedRunnableTestPaths Include="$([System.IO.Path]::ChangeExtension('%(MergedAssemblyMarkerPaths.Identity)', '.$(TestScriptExtension)'))" />
       <OutOfProcessTestMarkerPaths Include="$(XunitTestBinBase)\**\*.OutOfProcessTest"/>
       <OutOfProcessTestPaths Include="$([System.IO.Path]::ChangeExtension('%(OutOfProcessTestMarkerPaths.Identity)', '.$(TestScriptExtension)'))" />