-
Notifications
You must be signed in to change notification settings - Fork 321
Common | Wire Manual Tests to Common MDS (part 2) #3940
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
ecdbdb0
a38293c
88f53ca
3a799e7
97580fb
9014548
1361d3e
8c33e24
a6d9932
1ecb6c0
d67226f
f968fa7
65e3f6c
e2aa797
4d0b490
fcafada
6ba2179
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -52,11 +52,21 @@ | |
|
|
||
| <!-- Test configuration properties --> | ||
| <PropertyGroup> | ||
| <FilterStatement>$(Filter)</FilterStatement> | ||
| <FilterStatement Condition="'$(FilterStatement)' == ''">category!=failing&category!=flaky</FilterStatement> | ||
| <!--Collect code coverage unless explicitly disabled--> | ||
| <CollectCodeCoverage Condition="'$(CollectCodeCoverage)' == ''">true</CollectCodeCoverage> | ||
| <CollectStatement Condition="'$(CollectCodeCoverage)' == 'true'">--collect "Code coverage"</CollectStatement> | ||
| <!-- Set up default filters for tests to exclude failing and flaky tests --> | ||
| <Filter Condition="'$(Filter)' == ''">category!=failing&category!=flaky</Filter> | ||
| <FilterArgument>--filter "$(Filter)"</FilterArgument> | ||
|
|
||
| <!-- Collect code coverage unless explicitly disabled --> | ||
| <CollectCodeCoverage Condition="'$(CollectCodeCoverage)' == ''">true</CollectCodeCoverage> | ||
| <CollectArgument Condition="'$(CollectCodeCoverage)' == 'true'">--collect "Code coverage"</CollectArgument> | ||
|
|
||
| <!-- Set up tests to fail after hangs and report via blame --> | ||
| <BlameArgument>$(Blame)</BlameArgument> | ||
| <BlameArgument Condition="'$(BlameArgument)' == ''"> | ||
| --blame-hang | ||
| --blame-hang-dump-type full | ||
| --blame-hang-timeout 10m | ||
| </BlameArgument> | ||
| </PropertyGroup> | ||
|
|
||
| <!-- Release Build properties must be turned on for Release purposes, and turned off for Code Coverage calculations --> | ||
|
|
@@ -83,17 +93,6 @@ | |
| <FunctionalTests Include="**/FunctionalTests/Microsoft.Data.SqlClient.FunctionalTests.csproj" /> | ||
| <FunctionalTestsProj Include="**/FunctionalTests/Microsoft.Data.SqlClient.FunctionalTests.csproj" /> | ||
|
|
||
| <ManualTests Include="**/Common/Common.csproj" /> | ||
| <ManualTests Include="**/ManualTests/SQL/UdtTest/UDTs/Address/Address.csproj" /> | ||
| <ManualTests Include="**/ManualTests/SQL/UdtTest/UDTs/Circle/Circle.csproj" /> | ||
| <ManualTests Include="**/ManualTests/SQL/UdtTest/UDTs/Shapes/Shapes.csproj" /> | ||
| <ManualTests Include="**/ManualTests/SQL/UdtTest/UDTs/Utf8String/Utf8String.csproj" /> | ||
| <ManualTests Include="**/tools/Microsoft.Data.SqlClient.TestUtilities/Microsoft.Data.SqlClient.TestUtilities.csproj" /> | ||
| <ManualTests Include="**/tools/CoreFx.Private.TestUtilities/CoreFx.Private.TestUtilities.csproj" /> | ||
| <ManualTests Include="**/tools/TDS/TDS/TDS.csproj" /> | ||
| <ManualTests Include="**/tools/TDS/TDS.EndPoint/TDS.EndPoint.csproj" /> | ||
| <ManualTests Include="**/tools/TDS/TDS.Servers/TDS.Servers.csproj" /> | ||
| <ManualTests Include="**/CustomConfigurableRetryLogic/CustomRetryLogicProvider.csproj" /> | ||
| <ManualTests Include="**/ManualTests/Microsoft.Data.SqlClient.ManualTests.csproj" /> | ||
| <ManualTestsProj Include="**/ManualTests/Microsoft.Data.SqlClient.ManualTests.csproj" /> | ||
| </ItemGroup> | ||
|
|
@@ -104,10 +103,6 @@ | |
| <Target Name="BuildAllConfigurations" DependsOnTargets="Restore;BuildTools;BuildSqlServerLib;BuildNetFx;BuildNetCoreAllOS;BuildNetStandard;GenerateMdsPackage" /> | ||
| <Target Name="BuildSqlServerPackage" DependsOnTargets="BuildSqlServerLibAnyOS;GenerateSqlServerPackage"/> | ||
|
|
||
| <!-- @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. --> | ||
| <Target Name="BuildTestsNetCore" DependsOnTargets="RestoreTestsNetCore;BuildAKVNetCore;BuildManualTestsNetCore"/> | ||
| <Target Name="BuildTestsNetFx" DependsOnTargets="RestoreTestsNetFx;BuildAKVNetFx;BuildManualTestsNetFx" Condition="$(IsEnabledWindows) == 'true'"/> | ||
|
|
||
| <!-- Abstractions Targets --> | ||
| <PropertyGroup> | ||
| <AbstractionsProperties>$(CommonProperties)</AbstractionsProperties> | ||
|
|
@@ -202,18 +197,10 @@ | |
| <MSBuild Projects="@(NetCoreDriver)" Targets="restore" Properties="$(ProjectProperties)" /> | ||
| </Target> | ||
|
|
||
| <Target Name="RestoreTestsNetCore" DependsOnTargets="RestoreNetCore"> | ||
| <MSBuild Projects="@(ManualTests)" Targets="restore" Properties="$(TestProjectProperties)" /> | ||
| </Target> | ||
|
|
||
| <Target Name="RestoreNetFx" DependsOnTargets="RestoreSqlServerLib;RestoreAbstractions" Condition="'$(IsEnabledWindows)' == 'true'"> | ||
| <MSBuild Projects="@(NetFxDriver)" Targets="restore" Properties="$(ProjectProperties)" /> | ||
| </Target> | ||
|
|
||
| <Target Name="RestoreTestsNetFx" DependsOnTargets="RestoreNetFx" Condition="'$(IsEnabledWindows)' == 'true'"> | ||
| <MSBuild Projects="@(ManualTests)" Targets="restore" Properties="$(TestProjectProperties)" /> | ||
| </Target> | ||
|
|
||
| <Target Name="RestoreTools" Condition="'$(BuildTools)' == 'true'"> | ||
| <MSBuild Projects="@(Tools)" Targets="restore" Properties="$(CommonProperties)" /> | ||
| </Target> | ||
|
|
@@ -259,24 +246,6 @@ | |
| <MSBuild Projects="@(NetStandardDriver)" Properties="$(CI);$(ProjectProperties);Platform=AnyCPU;OSGroup=AnyOS;BuildForLib=True" RemoveProperties="TargetsWindows;TargetsUnix;" /> | ||
| </Target> | ||
|
|
||
| <Target Name="BuildManualTestsNetCore" DependsOnTargets="RestoreTestsNetCore"> | ||
| <Message Text=">>> Building ManualTestsNetCore [TestTargetOS=$(TestOS)netcoreapp;$(TestProjectProperties);Platform=AnyCPU;ReferenceType=$(ReferenceType);] ..." Condition="!$(ReferenceType.Contains('Package'))" /> | ||
| <MSBuild Projects="@(ManualTests)" Properties="TestTargetOS=$(TestOS)netcoreapp;$(TestProjectProperties);Platform=AnyCPU;" Condition="!$(ReferenceType.Contains('Package'))" /> | ||
|
|
||
| <!-- Only build platform specific builds for Package reference types --> | ||
| <Message Text=">>> Building ManualTestsNetCore [TestTargetOS=$(TestOS)netcoreapp;$(TestProjectProperties);Platform=$(Platform)] ..." Condition="$(ReferenceType.Contains('Package'))" /> | ||
| <MSBuild Projects="@(ManualTests)" Properties="TestTargetOS=$(TestOS)netcoreapp;$(TestProjectProperties);Platform=$(Platform);" Condition="$(ReferenceType.Contains('Package'))" /> | ||
| </Target> | ||
|
|
||
| <Target Name="BuildManualTestsNetFx" DependsOnTargets="RestoreTestsNetFx" Condition="'$(IsEnabledWindows)' == 'true'"> | ||
| <Message Text=">>> Building ManualTestsNetFx [TestTargetOS=$(TestOS)netfx;$(TestProjectProperties);Platform=AnyCPU;] ..." Condition="!$(ReferenceType.Contains('Package'))" /> | ||
| <MSBuild Projects="@(ManualTests)" Properties="TestTargetOS=$(TestOS)netfx;$(TestProjectProperties);Platform=AnyCPU;" Condition="!$(ReferenceType.Contains('Package'))" /> | ||
|
|
||
| <!-- Only build platform specific builds for Package reference types --> | ||
| <Message Text=">>> Building ManualTestsNetFx [TestTargetOS=$(TestOS)netfx;$(TestProjectProperties);Platform=$(Platform);] ..." Condition="$(ReferenceType.Contains('Package'))" /> | ||
| <MSBuild Projects="@(ManualTests)" Properties="TestTargetOS=$(TestOS)netfx;$(TestProjectProperties);Platform=$(Platform);" Condition="$(ReferenceType.Contains('Package'))" /> | ||
| </Target> | ||
|
|
||
| <!-- Tests --> | ||
|
|
||
| <!-- Run all tests applicable to the host OS. --> | ||
|
|
@@ -296,19 +265,17 @@ | |
| $(DotnetPath)dotnet test "@(UnitTestsProj)" | ||
| -f $(TF) | ||
| -p:Configuration=$(Configuration) | ||
| $(CollectStatement) | ||
| $(FilterArgument) | ||
| $(BlameArgument) | ||
| $(CollectArgument) | ||
| --results-directory $(ResultsDirectory) | ||
| --filter "$(FilterStatement)" | ||
| --logger:"trx;LogFilePrefix=Unit-Windows$(TargetGroup)-$(TestSet)" | ||
| --blame-hang | ||
| --blame-hang-dump-type full | ||
| --blame-hang-timeout 10m | ||
| </TestCommand> | ||
| <!-- Convert more than one whitespace character into one space --> | ||
| <TestCommand>$([System.Text.RegularExpressions.Regex]::Replace($(TestCommand), "\s+", " "))</TestCommand> | ||
| </PropertyGroup> | ||
| <Message Text=">>> Running unit tests for Windows via command: $(TestCommand)"/> | ||
| <Exec ConsoleToMsBuild="true" Command="$(TestCommand)"/> | ||
|
Check failure on line 278 in build.proj
|
||
| </Target> | ||
|
|
||
| <!-- Run all unit tests applicable to Unix. --> | ||
|
|
@@ -318,13 +285,11 @@ | |
| $(DotnetPath)dotnet test "@(UnitTestsProj)" | ||
| -f $(TF) | ||
| -p:Configuration=$(Configuration) | ||
| $(CollectStatement) | ||
| $(FilterArgument) | ||
| $(BlameArgument) | ||
| $(CollectArgument) | ||
| --results-directory $(ResultsDirectory) | ||
| --filter "$(FilterStatement)" | ||
| --logger:"trx;LogFilePrefix=Unit-Unixnetcoreapp-$(TestSet)" | ||
| --blame-hang | ||
| --blame-hang-dump-type full | ||
| --blame-hang-timeout 10m | ||
| </TestCommand> | ||
| <!-- Convert more than one whitespace character into one space --> | ||
| <TestCommand>$([System.Text.RegularExpressions.Regex]::Replace($(TestCommand), "\s+", " "))</TestCommand> | ||
|
|
@@ -346,19 +311,17 @@ | |
| -p:ReferenceType=$(ReferenceType) | ||
| -p:AbstractionsPackageVersion=$(AbstractionsPackageVersion) | ||
| -p:MdsPackageVersion=$(MdsPackageVersion) | ||
| $(CollectStatement) | ||
| $(FilterArgument) | ||
| $(BlameArgument) | ||
| $(CollectArgument) | ||
| --results-directory $(ResultsDirectory) | ||
| --filter "$(FilterStatement)" | ||
| --logger:"trx;LogFilePrefix=Functional-Windows$(TargetGroup)-$(TestSet)" | ||
| --blame-hang | ||
| --blame-hang-dump-type full | ||
| --blame-hang-timeout 10m | ||
| </TestCommand> | ||
| <!-- Convert more than one whitespace character into one space --> | ||
| <TestCommand>$([System.Text.RegularExpressions.Regex]::Replace($(TestCommand), "\s+", " "))</TestCommand> | ||
| </PropertyGroup> | ||
| <Message Text=">>> Running Functional test for Windows via command: $(TestCommand)" /> | ||
| <Exec ConsoleToMsBuild="true" Command="$(TestCommand)" /> | ||
|
Check failure on line 324 in build.proj
|
||
| </Target> | ||
|
|
||
| <!-- Run all Functional tests applicable to Unix. --> | ||
|
|
@@ -371,13 +334,11 @@ | |
| -p:ReferenceType=$(ReferenceType) | ||
| -p:AbstractionsPackageVersion=$(AbstractionsPackageVersion) | ||
| -p:MdsPackageVersion=$(MdsPackageVersion) | ||
| $(CollectStatement) | ||
| $(FilterArgument) | ||
| $(BlameArgument) | ||
| $(CollectArgument) | ||
| --results-directory $(ResultsDirectory) | ||
| --filter "$(FilterStatement)" | ||
| --logger:"trx;LogFilePrefix=Functional-Unixnetcoreapp-$(TestSet)" | ||
| --blame-hang | ||
| --blame-hang-dump-type full | ||
| --blame-hang-timeout 10m | ||
| </TestCommand> | ||
| <!-- Convert more than one whitespace character into one space --> | ||
| <TestCommand>$([System.Text.RegularExpressions.Regex]::Replace($(TestCommand), "\s+", " "))</TestCommand> | ||
|
|
@@ -394,27 +355,28 @@ | |
| <PropertyGroup> | ||
| <TestCommand> | ||
| $(DotnetPath)dotnet test "@(ManualTestsProj)" | ||
| --no-build | ||
| -v n | ||
| -f $(TF) | ||
| -p:Configuration=$(Configuration) | ||
| -p:Target$(TFGroup)Version=$(TF) | ||
| -p:ReferenceType=$(ReferenceType) | ||
| -p:TestSet=$(TestSet) | ||
| -p:TestTargetOS=Windows$(TargetGroup) | ||
| -p:AbstractionsPackageVersion=$(AbstractionsPackageVersion) | ||
| -p:MdsPackageVersion=$(MdsPackageVersion) | ||
| $(CollectStatement) | ||
| $(FilterArgument) | ||
| $(BlameArgument) | ||
| $(CollectArgument) | ||
| --results-directory $(ResultsDirectory) | ||
| --filter "$(FilterStatement)" | ||
| --logger:"trx;LogFilePrefix=Manual-Windows$(TargetGroup)-$(TestSet)" | ||
| --blame-hang | ||
| --blame-hang-dump-type full | ||
| --blame-hang-timeout 10m | ||
| </TestCommand> | ||
| <TestCommand>$(TestCommand.Replace($([System.Environment]::NewLine), " "))</TestCommand> | ||
| <!-- Add test set only if it was provided - otherwise it will be permanently set to '' --> | ||
| <TestCommand Condition="'$(TestSet)' != ''"> | ||
| $(TestCommand) | ||
| -p:TestSet=$(TestSet) | ||
| </TestCommand> | ||
|
|
||
| <!-- Convert more than one whitespace character into one space --> | ||
| <TestCommand>$([System.Text.RegularExpressions.Regex]::Replace($(TestCommand), "\s+", " "))</TestCommand> | ||
| </PropertyGroup> | ||
| <Message Text=">>> Running Manual test for Windows via command: $(TestCommand)" /> | ||
| <Exec ConsoleToMsBuild="true" Command="$(TestCommand)" /> | ||
|
Check failure on line 379 in build.proj
|
||
| </Target> | ||
|
|
||
| <!-- Run all Manual tests applicable to Unix. --> | ||
|
|
@@ -422,24 +384,26 @@ | |
| <PropertyGroup> | ||
| <TestCommand> | ||
| $(DotnetPath)dotnet test "@(ManualTestsProj)" | ||
| --no-build | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we remove this, make sure to update the buildguide to remove the test restore/compile steps. |
||
| -v n | ||
| -f $(TF) | ||
| -p:Configuration=$(Configuration) | ||
| -p:TargetNetCoreVersion=$(TF) | ||
| -p:ReferenceType=$(ReferenceType) | ||
| -p:TestSet=$(TestSet) | ||
| -p:TestTargetOS=Unixnetcoreapp | ||
| -p:AbstractionsPackageVersion=$(AbstractionsPackageVersion) | ||
| -p:MdsPackageVersion=$(MdsPackageVersion) | ||
| $(CollectStatement) | ||
| $(FilterArgument) | ||
| $(BlameArgument) | ||
| $(CollectArgument) | ||
| --results-directory $(ResultsDirectory) | ||
| --filter "$(FilterStatement)" | ||
| --logger:"trx;LogFilePrefix=Manual-Unixnetcoreapp-$(TestSet)" | ||
| --blame-hang | ||
| --blame-hang-dump-type full | ||
| --blame-hang-timeout 10m | ||
| </TestCommand> | ||
| <TestCommand>$(TestCommand.Replace($([System.Environment]::NewLine), " "))</TestCommand> | ||
|
|
||
| <!-- Add test set only if it was provided - otherwise it will be permanently set to '' --> | ||
| <TestCommand Condition="'$(TestSet)' != ''"> | ||
| $(TestCommand) | ||
| -p:TestSet=$(TestSet) | ||
| </TestCommand> | ||
|
|
||
| <!-- Convert more than one whitespace character into one space --> | ||
| <TestCommand>$([System.Text.RegularExpressions.Regex]::Replace($(TestCommand), "\s+", " "))</TestCommand> | ||
| </PropertyGroup> | ||
| <Message Text=">>> Running Manual test for Unix via command: $(TestCommand)" /> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The other test targets emit the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep, must've been an accident somewhere. It should be added back now |
||
| <Exec ConsoleToMsBuild="true" Command="$(TestCommand)" /> | ||
|
|
||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,30 +33,6 @@ parameters: | |
| - Unixnetcoreapp | ||
|
|
||
| steps: | ||
| - task: MSBuild@1 | ||
| displayName: 'Build AKV Provider .NET' | ||
| inputs: | ||
| solution: build.proj | ||
| msbuildArchitecture: x64 | ||
| msbuildArguments: >- | ||
| -p:Configuration=Release | ||
| -t:BuildAKVNetCore | ||
| -p:ReferenceType=Package | ||
| -p:AbstractionsPackageVersion=${{ parameters.abstractionsPackageVersion }} | ||
| -p:MdsPackageVersion=${{ parameters.mdsPackageVersion }} | ||
|
|
||
| - task: MSBuild@1 | ||
| displayName: 'MSBuild Build Tests for ${{parameters.TargetNetCoreVersion }}' | ||
| inputs: | ||
| solution: build.proj | ||
| msbuildArchitecture: x64 | ||
| msbuildArguments: >- | ||
| -t:BuildTestsNetCore | ||
| -p:ReferenceType=Package | ||
| -p:TargetNetCoreVersion=${{ parameters.TargetNetCoreVersion }} | ||
| -p:AbstractionsPackageVersion=${{ parameters.abstractionsPackageVersion }} | ||
| -p:MdsPackageVersion=${{ parameters.mdsPackageVersion }} | ||
| -p:Configuration=Release | ||
|
|
||
| # Don't run unit tests using package reference. Unit tests are only run using project reference. | ||
|
Comment on lines
35
to
37
|
||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.