|
68 | 68 | <_NuGetPackagesAndSolutions Include="Runtime.sln" /> |
69 | 69 |
|
70 | 70 | <!-- Avoid restoring RuntimePortable.sln directly. --> |
71 | | - <_NuGetPackagesAndSolutions Include="src\System.Net.Http.Formatting.NetCore\packages.config; |
72 | | - test\System.Net.Http.Formatting.NetCore.Test\packages.config" |
| 71 | + <_NuGetPackagesAndSolutions Include="src\System.Net.Http.Formatting.NetCore\packages.config" |
73 | 72 | Condition=" '$(BuildPortable)' == 'true' " /> |
74 | | - <_ProjectsToRestore Include="test\System.Net.Http.Formatting.NetStandard.Test\System.Net.Http.Formatting.NetStandard.Test.csproj" |
| 73 | + <_ProjectsToRestore Include=" |
| 74 | + test\System.Net.Http.Formatting.NetCore.Test\System.Net.Http.Formatting.NetCore.Test.csproj; |
| 75 | + test\System.Net.Http.Formatting.NetStandard.Test\System.Net.Http.Formatting.NetStandard.Test.csproj" |
75 | 76 | Condition=" '$(BuildPortable)' == 'true' " /> |
76 | 77 | </ItemGroup> |
77 | 78 |
|
|
114 | 115 | <Target Name="RunTests" DependsOnTargets="CheckSkipStrongNames"> |
115 | 116 | <ItemGroup> |
116 | 117 | <_TestDLLsXunit Include="bin\$(Configuration)\test\*.Test.dll" /> |
117 | | - <_TestDLLsXunit Include="bin\$(Configuration)\test\*.Test.*.dll" /> |
118 | | - <_TestDLLsXunit Include="bin\$(Configuration)\Test\NetCore\*.Test.dll" Condition="'$(BuildPortable)' == 'true'" /> |
| 118 | + <_TestDLLsXunit Include="bin\$(Configuration)\test\*\net4*\*.Test.dll" /> |
119 | 119 | <_XunitProject Include="tools\WebStack.xunit.targets"> |
120 | 120 | <Properties>TestAssembly=%(_TestDLLsXunit.FullPath);XmlPath=$(TestResultsDirectory)%(_TestDLLsXunit.FileName)-XunitResults.xml</Properties> |
121 | 121 | </_XunitProject> |
| 122 | + |
| 123 | + <_VSTestDLLs Include="bin\$(Configuration)\test\*\netcoreapp*\*.Test.dll" /> |
| 124 | + </ItemGroup> |
| 125 | + <ItemGroup> |
| 126 | + <_VSTestDLLs> |
| 127 | + <TestResultsPath>$(TestResultsDirectory)%(FileName)-NetCoreApp-XunitResults.xml</TestResultsPath> |
| 128 | + </_VSTestDLLs> |
122 | 129 | </ItemGroup> |
123 | 130 |
|
124 | 131 | <!-- Recreate the test results directory so that print summary doesn't run on old test results. --> |
|
129 | 136 | <Output TaskParameter="TargetOutputs" ItemName="_ExitCodes" /> |
130 | 137 | </MSBuild> |
131 | 138 |
|
132 | | - <!-- Failures in this project will fail build. But, results will not be included in test run summary. --> |
133 | | - <MSBuild |
134 | | - Properties="Configuration=$(Configuration)" |
135 | | - Projects="test\System.Net.Http.Formatting.NetStandard.Test\System.Net.Http.Formatting.NetStandard.Test.csproj" |
136 | | - Targets="Test" |
137 | | - Condition="'$(BuildPortable)' == 'true'" /> |
| 139 | + <Exec Command="dotnet vstest @(_VSTestDLLs) --logger:"xunit;LogFilePath=%(_VSTestDLLs.TestResultsPath)"" |
| 140 | + Condition=" '$(BuildPortable)' == 'true' " |
| 141 | + IgnoreExitCode="true"> |
| 142 | + <Output TaskParameter="ExitCode" ItemName="_VSTestErrorCode" /> |
| 143 | + </Exec> |
138 | 144 | </Target> |
139 | 145 |
|
140 | 146 | <Target Name="CheckSkipStrongNames" DependsOnTargets="RestoreSkipStrongNames"> |
|
0 commit comments