|
70 | 70 | <UnitTests Include="**/UnitTests/Microsoft.Data.SqlClient.UnitTests.csproj" /> |
71 | 71 | <UnitTestsProj Include="**/UnitTests/Microsoft.Data.SqlClient.UnitTests.csproj" /> |
72 | 72 |
|
73 | | - <FunctionalTests Include="**/Common/Common.csproj" /> |
74 | | - <FunctionalTests Include="**/tools/TDS/TDS/TDS.csproj" /> |
75 | | - <FunctionalTests Include="**/tools/TDS/TDS.EndPoint/TDS.EndPoint.csproj" /> |
76 | | - <FunctionalTests Include="**/tools/TDS/TDS.Servers/TDS.Servers.csproj" /> |
77 | | - <FunctionalTests Include="**/tools/Microsoft.Data.SqlClient.TestUtilities/Microsoft.Data.SqlClient.TestUtilities.csproj" /> |
78 | | - <FunctionalTests Include="**/tools/CoreFx.Private.TestUtilities/CoreFx.Private.TestUtilities.csproj" /> |
79 | | - <FunctionalTests Include="**/ManualTests/SQL/UdtTest/UDTs/Address/Address.csproj" /> |
80 | 73 | <FunctionalTests Include="**/FunctionalTests/Microsoft.Data.SqlClient.FunctionalTests.csproj" /> |
81 | 74 | <FunctionalTestsProj Include="**/FunctionalTests/Microsoft.Data.SqlClient.FunctionalTests.csproj" /> |
82 | 75 |
|
|
87 | 80 | <ManualTests Include="**/ManualTests/SQL/UdtTest/UDTs/Utf8String/Utf8String.csproj" /> |
88 | 81 | <ManualTests Include="**/tools/Microsoft.Data.SqlClient.TestUtilities/Microsoft.Data.SqlClient.TestUtilities.csproj" /> |
89 | 82 | <ManualTests Include="**/tools/CoreFx.Private.TestUtilities/CoreFx.Private.TestUtilities.csproj" /> |
| 83 | + <ManualTests Include="**/tools/TDS/TDS/TDS.csproj" /> |
| 84 | + <ManualTests Include="**/tools/TDS/TDS.EndPoint/TDS.EndPoint.csproj" /> |
| 85 | + <ManualTests Include="**/tools/TDS/TDS.Servers/TDS.Servers.csproj" /> |
90 | 86 | <ManualTests Include="**/CustomConfigurableRetryLogic/CustomRetryLogicProvider.csproj" /> |
91 | 87 | <ManualTests Include="**/ManualTests/Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" /> |
92 | 88 | <ManualTestsProj Include="**/ManualTests/Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" /> |
|
97 | 93 | <Target Name="BuildAll" DependsOnTargets="BuildSqlServerLib;BuildNetFx;BuildNetCore;BuildNetStandard" /> |
98 | 94 | <Target Name="BuildAllConfigurations" DependsOnTargets="Restore;BuildTools;BuildSqlServerLib;BuildNetFx;BuildNetCoreAllOS;BuildNetStandard;GenerateNugetPackage" /> |
99 | 95 | <Target Name="BuildSqlServerPackage" DependsOnTargets="BuildSqlServerLibAnyOS;GenerateSqlServerPackage"/> |
100 | | - <Target Name="BuildTestsNetCore" DependsOnTargets="RestoreTestsNetCore;BuildAKVNetCore;BuildFunctionalTestsNetCore;BuildManualTestsNetCore"/> |
101 | | - <Target Name="BuildTestsNetFx" DependsOnTargets="RestoreTestsNetFx;BuildAKVNetFx;BuildFunctionalTestsNetFx;BuildManualTestsNetFx" Condition="$(IsEnabledWindows) == 'true'"/> |
| 96 | + |
| 97 | + <!-- @TODO: Manual tests have a reference to AKV provider, and AKV provider is not built on non-windows pipeline runs. Thus it is added to the dependencies of the build tests target. This is not good since it means AKV is built twice on windows and once on unix, in a mix of implicit and explicit. The pipeline should be modified to build it in both cases, or the build should be updated to have dotnet build the test projects. --> |
| 98 | + <Target Name="BuildTestsNetCore" DependsOnTargets="RestoreTestsNetCore;BuildAKVNetCore;BuildManualTestsNetCore"/> |
| 99 | + <Target Name="BuildTestsNetFx" DependsOnTargets="RestoreTestsNetFx;BuildAKVNetFx;BuildManualTestsNetFx" Condition="$(IsEnabledWindows) == 'true'"/> |
102 | 100 |
|
103 | 101 | <Target Name="RestoreSqlServerLib"> |
104 | 102 | <MSBuild Projects="@(SqlServerLib)" Targets="restore" /> |
|
110 | 108 |
|
111 | 109 | <Target Name="RestoreTestsNetCore"> |
112 | 110 | <MSBuild Projects="@(ManualTests)" Targets="restore" Properties="$(TestProjectProperties)" /> |
113 | | - <MSBuild Projects="@(FunctionalTests)" Targets="restore" Properties="$(TestProjectProperties)" /> |
114 | 111 | </Target> |
115 | 112 |
|
116 | 113 | <Target Name="RestoreNetFx" Condition="'$(IsEnabledWindows)' == 'true'"> |
|
119 | 116 |
|
120 | 117 | <Target Name="RestoreTestsNetFx" Condition="'$(IsEnabledWindows)' == 'true'"> |
121 | 118 | <MSBuild Projects="@(ManualTests)" Targets="restore" Properties="$(TestProjectProperties)" /> |
122 | | - <MSBuild Projects="@(FunctionalTests)" Targets="restore" Properties="$(TestProjectProperties)" /> |
123 | 119 | </Target> |
124 | 120 |
|
125 | 121 | <Target Name="BuildTools" Condition="'$(BuildTools)' == 'true'"> |
|
167 | 163 | <Target Name="BuildNetStandard"> |
168 | 164 | <MSBuild Projects="@(NetStandardDriver)" Properties="$(CI);$(ProjectProperties);Platform=AnyCPU;OSGroup=AnyOS;BuildForLib=True" RemoveProperties="TargetsWindows;TargetsUnix;" /> |
169 | 165 | </Target> |
170 | | - |
171 | | - <Target Name="BuildFunctionalTestsNetCore" DependsOnTargets="RestoreTestsNetCore"> |
172 | | - <Message Text=">>> Building FunctionalTestsNetCore [TestTargetOS=$(TestOS)netcoreapp;$(TestProjectProperties);Platform=AnyCPU;ReferenceType=$(ReferenceType);] ..." Condition="!$(ReferenceType.Contains('Package'))" /> |
173 | | - <MSBuild Projects="@(FunctionalTests)" Properties="TestTargetOS=$(TestOS)netcoreapp;$(TestProjectProperties);Platform=AnyCPU;" Condition="!$(ReferenceType.Contains('Package'))" /> |
174 | | - |
175 | | - <!-- Only build platform specific builds for Package reference types --> |
176 | | - <Message Text=">>> Building FunctionalTestsNetCore [TestTargetOS=$(TestOS)netcoreapp;$(TestProjectProperties);Platform=$(Platform);ReferenceType=$(ReferenceType);] ..." Condition="$(ReferenceType.Contains('Package'))" /> |
177 | | - <MSBuild Projects="@(FunctionalTests)" Properties="TestTargetOS=$(TestOS)netcoreapp;$(TestProjectProperties);Platform=$(Platform);" Condition="$(ReferenceType.Contains('Package'))" /> |
178 | | - </Target> |
179 | 166 |
|
180 | 167 | <Target Name="BuildManualTestsNetCore" DependsOnTargets="RestoreTestsNetCore"> |
181 | 168 | <Message Text=">>> Building ManualTestsNetCore [TestTargetOS=$(TestOS)netcoreapp;$(TestProjectProperties);Platform=AnyCPU;ReferenceType=$(ReferenceType);] ..." Condition="!$(ReferenceType.Contains('Package'))" /> |
|
185 | 172 | <Message Text=">>> Building ManualTestsNetCore [TestTargetOS=$(TestOS)netcoreapp;$(TestProjectProperties);Platform=$(Platform);ReferenceType=$(ReferenceType);] ..." Condition="$(ReferenceType.Contains('Package'))" /> |
186 | 173 | <MSBuild Projects="@(ManualTests)" Properties="TestTargetOS=$(TestOS)netcoreapp;$(TestProjectProperties);Platform=$(Platform);" Condition="$(ReferenceType.Contains('Package'))" /> |
187 | 174 | </Target> |
188 | | - |
189 | | - <Target Name="BuildFunctionalTestsNetFx" DependsOnTargets="RestoreTestsNetFx" Condition="'$(IsEnabledWindows)' == 'true'"> |
190 | | - <Message Text=">>> Building FunctionalTestsNetFx [TestTargetOS=$(TestOS)netfx;$(TestProjectProperties);Platform=AnyCPU;] ..." Condition="!$(ReferenceType.Contains('Package'))" /> |
191 | | - <MSBuild Projects="@(FunctionalTests)" Properties="TestTargetOS=$(TestOS)netfx;$(TestProjectProperties);Platform=AnyCPU;" Condition="!$(ReferenceType.Contains('Package'))" /> |
192 | | - |
193 | | - <!-- Only build platform specific builds for Package reference types --> |
194 | | - <Message Text=">>> Building FunctionalTestsNetFx [TestTargetOS=$(TestOS)netfx;$(TestProjectProperties);Platform=$(Platform);] ..." Condition="$(ReferenceType.Contains('Package'))" /> |
195 | | - <MSBuild Projects="@(FunctionalTests)" Properties="TestTargetOS=$(TestOS)netfx;$(TestProjectProperties);Platform=$(Platform);" Condition="$(ReferenceType.Contains('Package'))" /> |
196 | | - </Target> |
197 | 175 |
|
198 | 176 | <Target Name="BuildManualTestsNetFx" DependsOnTargets="RestoreTestsNetFx" Condition="'$(IsEnabledWindows)' == 'true'"> |
199 | 177 | <Message Text=">>> Building ManualTestsNetFx [TestTargetOS=$(TestOS)netfx;$(TestProjectProperties);Platform=AnyCPU;] ..." Condition="!$(ReferenceType.Contains('Package'))" /> |
|
258 | 236 | <PropertyGroup> |
259 | 237 | <TestCommand> |
260 | 238 | $(DotnetPath)dotnet test "@(FunctionalTestsProj)" |
261 | | - --no-build |
262 | | - -v n |
| 239 | + -f $(TF) |
263 | 240 | -p:Configuration=$(Configuration) |
264 | | - -p:Target$(TFGroup)Version=$(TF) |
265 | 241 | -p:ReferenceType=$(ReferenceType) |
266 | | - -p:TestSet=$(TestSet) |
267 | | - -p:TestTargetOS=Windows$(TargetGroup) |
268 | 242 | $(CollectStatement) |
269 | 243 | --results-directory $(ResultsDirectory) |
270 | 244 | --filter "$(FilterStatement)" |
271 | 245 | --logger:"trx;LogFilePrefix=Functional-Windows$(TargetGroup)-$(TestSet)" |
272 | 246 | </TestCommand> |
273 | | - <TestCommand>$(TestCommand.Replace($([System.Environment]::NewLine), " "))</TestCommand> |
| 247 | + <!-- Convert more than one whitespace character into one space --> |
| 248 | + <TestCommand>$([System.Text.RegularExpressions.Regex]::Replace($(TestCommand), "\s+", " "))</TestCommand> |
274 | 249 | </PropertyGroup> |
275 | 250 | <Message Text=">>> Running Functional test for Windows via command: $(TestCommand)" /> |
276 | 251 | <Exec ConsoleToMsBuild="true" Command="$(TestCommand)" /> |
|
281 | 256 | <PropertyGroup> |
282 | 257 | <TestCommand> |
283 | 258 | $(DotnetPath)dotnet test "@(FunctionalTestsProj)" |
284 | | - --no-build |
285 | | - -v n |
| 259 | + -f $(TF) |
286 | 260 | -p:Configuration=$(Configuration) |
287 | | - -p:TargetNetCoreVersion=$(TF) |
288 | 261 | -p:ReferenceType=$(ReferenceType) |
289 | | - -p:TestSet=$(TestSet) |
290 | | - -p:TestTargetOS=Unixnetcoreapp |
291 | 262 | $(CollectStatement) |
292 | 263 | --results-directory $(ResultsDirectory) |
293 | 264 | --filter "$(FilterStatement)" |
294 | 265 | --logger:"trx;LogFilePrefix=Functional-Unixnetcoreapp-$(TestSet)" |
295 | 266 | </TestCommand> |
296 | | - <TestCommand>$(TestCommand.Replace($([System.Environment]::NewLine), " "))</TestCommand> |
| 267 | + <!-- Convert more than one whitespace character into one space --> |
| 268 | + <TestCommand>$([System.Text.RegularExpressions.Regex]::Replace($(TestCommand), "\s+", " "))</TestCommand> |
297 | 269 | </PropertyGroup> |
298 | 270 | <Message Text=">>> Running Functional test for Unix via command: $(TestCommand)" /> |
299 | 271 | <Exec ConsoleToMsBuild="true" Command="$(TestCommand)" /> |
|
0 commit comments