Browse Source
Remove BuildTests target (#3498)
Remove BuildTests target (#3498)
* Issue #3147 - Can't build SqlClient package - Fixed case-sensitive filenames. - Fixed bad dotnet command when generating NotSupported API. * Issue #3147 - Can't build SqlClient package - Removed 'BuildTests' target from build.proj. - Corrected BUILDGUIDE related to building and running tests. * Discussion #3147 - Can't build SqlClient package - Removed unused and outdated scripts.feat/azure-split

committed by
GitHub

No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 19 additions and 206 deletions
-
36BUILDGUIDE.md
-
65RunPackageReferenceTests.cmd
-
54RunProjectReferenceTests.cmd
-
8RunTests.sh
-
5build.proj
-
12buildAddons.cmd
-
43override.ps1
-
0tools/GenAPI/Directory.Build.props
-
2tools/targets/NotSupported.targets
@ -1,65 +0,0 @@ |
|||||
@echo off |
|
||||
|
|
||||
:: .NET CORE TEST CASES |
|
||||
echo Building .NET Core Tests |
|
||||
call :pauseOnError msbuild -t:Clean |
|
||||
|
|
||||
:: ************** IMPORTANT NOTE BEFORE PROCEEDING WITH "PACKAGE" REFERENCE TYPE *************** |
|
||||
:: THESE ARE NOT STAND ALONE TEST COMMANDS AND NEED A DEVELOPER'S SPECIAL ATTENTION TO WORK. ATTEMPTING TO RUN THE ENTIRE SET OF COMMANDS AS-IS IS LIKELY TO FAIL! |
|
||||
|
|
||||
:: CREATE A NUGET PACKAGE WITH BELOW COMMAND AND ADD TO LOCAL FOLDER + UPDATE NUGET CONFIG FILE TO READ FROM THAT LOCATION |
|
||||
:: > MSBuild -p:Configuration=Release |
|
||||
|
|
||||
:: Based on `dotnet test` documentation, the `Platform` property has no effect on choosing the underlying architecture for the test execution environment. |
|
||||
:: You need to install and run the `dotnet` command for a specific architecture (x64, x86, Arm64). |
|
||||
|
|
||||
:: REFERENCE TYPE "PACKAGE" |
|
||||
call :pauseOnError msbuild -p:Configuration="Release" -t:BuildAKVNetFx -p:ReferenceType=Package |
|
||||
call :pauseOnError msbuild -p:Configuration="Release" -t:BuildAKVNetCore -p:ReferenceType=Package |
|
||||
call :pauseOnError msbuild -p:Configuration="Release" -t:BuildAKVNetSt -p:ReferenceType=Package |
|
||||
|
|
||||
:: .NET - REFERENCE TYPE "PACKAGE" |
|
||||
call :pauseOnError msbuild -p:Configuration="Release" -t:BuildTestsNetCore -p:ReferenceType=Package -p:TargetNetCoreVersion=net8.0 |
|
||||
call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Configuration="Release" -p:TestTargetOS="Windowsnetcoreapp" --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" -p:Platform="AnyCPU" -p:TargetNetCoreVersion=net8.0 -p:ReferenceType=Package -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\package-net8.0-functional-anycpu.xml |
|
||||
call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Configuration="Release" -p:TestTargetOS="Windowsnetcoreapp" --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" -p:Platform="AnyCPU" -p:TargetNetCoreVersion=net8.0 -p:ReferenceType=Package -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\package-net8.0-manual-anycpu.xml |
|
||||
|
|
||||
call :pauseOnError msbuild -p:Configuration="Release" -t:BuildTestsNetCore -p:ReferenceType=Package -p:Platform=x64 -p:TargetNetCoreVersion=net8.0 |
|
||||
call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Configuration="Release" -p:TestTargetOS="Windowsnetcoreapp" --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" -p:Platform="x64" -p:TargetNetCoreVersion=net8.0 -p:ReferenceType=Package -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\package-net8.0-functional-x64.xml |
|
||||
call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Configuration="Release" -p:TestTargetOS="Windowsnetcoreapp" --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" -p:Platform="x64" -p:TargetNetCoreVersion=net8.0 -p:ReferenceType=Package -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\package-net8.0-manual-x64.xml |
|
||||
|
|
||||
call :pauseOnError msbuild -p:Configuration="Release" -t:BuildTestsNetCore -p:ReferenceType=Package -p:Platform=Win32 -p:TargetNetCoreVersion=net8.0 |
|
||||
call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Configuration="Release" -p:TestTargetOS="Windowsnetcoreapp" --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" -p:Platform="Win32" -p:TargetNetCoreVersion=net8.0 -p:ReferenceType=Package -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\package-net8.0-functional-win32.xml |
|
||||
call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Configuration="Release" -p:TestTargetOS="Windowsnetcoreapp" --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" -p:Platform="Win32" -p:TargetNetCoreVersion=net8.0 -p:ReferenceType=Package -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\package-net8.0-manual-win32.xml |
|
||||
|
|
||||
:: .NET Framework - REFERENCE TYPE "PACKAGE" |
|
||||
|
|
||||
call :pauseOnError msbuild -p:Configuration="Release" -t:BuildTestsNetFx -p:ReferenceType=Package -p:Platform=AnyCPU -p:TargetNetFxVersion=net462 |
|
||||
call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Platform="AnyCPU" -p:Configuration="Release" -p:TestTargetOS="Windowsnetfx" --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -p:ReferenceType=Package -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\package-net462-functional-anycpu.xml |
|
||||
call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Platform="AnyCPU" -p:Configuration="Release" -p:TestTargetOS="Windowsnetfx" --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -p:ReferenceType=Package -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\package-net462-manual-anycpu.xml |
|
||||
|
|
||||
call :pauseOnError msbuild -p:Configuration="Release" -t:BuildTestsNetFx -p:ReferenceType=Package -p:Platform=AnyCPU -p:TargetNetFxVersion=net48 |
|
||||
call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Platform="AnyCPU" -p:Configuration="Release" -p:TestTargetOS="Windowsnetfx" --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -p:ReferenceType=Package -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\package-net48-functional-anycpu.xml |
|
||||
call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Platform="AnyCPU" -p:Configuration="Release" -p:TestTargetOS="Windowsnetfx" --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -p:ReferenceType=Package -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\package-net48-manual-anycpu.xml |
|
||||
|
|
||||
call :pauseOnError msbuild -p:Configuration="Release" -t:BuildTestsNetFx -p:ReferenceType=Package -p:Platform=x64 -p:TargetNetFxVersion=net462 |
|
||||
call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Platform="x64" -p:Configuration="Release" -p:TestTargetOS="Windowsnetfx" --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -p:ReferenceType=Package -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\package-net462-functional-x64.xml |
|
||||
call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Platform="x64" -p:Configuration="Release" -p:TestTargetOS="Windowsnetfx" --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -p:ReferenceType=Package -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\package-net462-manual-x64.xml |
|
||||
|
|
||||
call :pauseOnError msbuild -p:Configuration="Release" -t:BuildTestsNetFx -p:TargetNetFxVersion=net48 -p:Platform=x64 -p:ReferenceType=Package |
|
||||
call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Platform="x64" -p:Configuration="Release" -p:TestTargetOS="Windowsnetfx" -p:TargetNetFxVersion=net48 --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -p:ReferenceType=Package -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\package-net48-functional-x64.xml |
|
||||
call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Platform="x64" -p:Configuration="Release" -p:TestTargetOS="Windowsnetfx" -p:TargetNetFxVersion=net48 --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -p:ReferenceType=Package -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\package-net48-manual-x64.xml |
|
||||
|
|
||||
call :pauseOnError msbuild -p:Configuration="Release" -t:BuildTestsNetFx -p:ReferenceType=Package -p:Platform=Win32 -p:TargetNetFxVersion=net462 |
|
||||
call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Platform="Win32" -p:Configuration="Release" -p:TestTargetOS="Windowsnetfx" --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -p:ReferenceType=Package -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\package-net462-functional-win32.xml |
|
||||
call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Platform="Win32" -p:Configuration="Release" -p:TestTargetOS="Windowsnetfx" --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -p:ReferenceType=Package -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\package-net462-manual-win32.xml |
|
||||
|
|
||||
call :pauseOnError msbuild -p:Configuration="Release" -t:BuildTestsNetFx -p:TargetNetFxVersion=net48 -p:Platform=Win32 -p:ReferenceType=Package |
|
||||
call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Platform="Win32" -p:Configuration="Release" -p:TestTargetOS="Windowsnetfx" -p:TargetNetFxVersion=net48 --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -p:ReferenceType=Package -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\package-net48-functional-Win32.xml |
|
||||
call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Platform="Win32" -p:Configuration="Release" -p:TestTargetOS="Windowsnetfx" -p:TargetNetFxVersion=net48 --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -p:ReferenceType=Package -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\package-net48-manual-Win32.xml |
|
||||
|
|
||||
goto :eof |
|
||||
|
|
||||
:pauseOnError |
|
||||
%* |
|
||||
if ERRORLEVEL 1 pause |
|
||||
goto :eof |
|
@ -1,54 +0,0 @@ |
|||||
@echo off |
|
||||
|
|
||||
:: Default target frameworks |
|
||||
set netfxVersion=net462 |
|
||||
set netcoreVersion=net8.0 |
|
||||
|
|
||||
:: Accept two parameters for .NET Framework and .NET versions. |
|
||||
:: Examples: |
|
||||
:: - uses net48 and net8.0: |
|
||||
:: > RunProjectReferenceTests.cmd net48 net8.0 |
|
||||
:: - uses default target frameworks: |
|
||||
:: > RunProjectReferenceTests.cmd |
|
||||
:: - uses net48 and default target frameworks for netcore: |
|
||||
:: > RunProjectReferenceTests.cmd net48 |
|
||||
|
|
||||
if not "%~1" == "" set netfxVersion=%1 |
|
||||
if not "%~2" == "" set netcoreVersion=%2 |
|
||||
|
|
||||
echo .NET Framework = %netfxVersion% |
|
||||
echo .NET Core = %netcoreVersion% |
|
||||
|
|
||||
call :pauseOnError msbuild -t:Clean |
|
||||
:: .NET FRAMEWORK - REFERENCE TYPE "PROJECT" |
|
||||
:: Only Builds AnyCPU for project reference! |
|
||||
|
|
||||
:: Based on `dotnet test` documentation, the `Platform` property has no effect on choosing the underlying architecture for the test execution environment. |
|
||||
:: You need to install and run the `dotnet` command for a specific architecture (x64, x86, Arm64). |
|
||||
|
|
||||
echo Building .NET Framework %netfxVersion% Tests ... |
|
||||
call :pauseOnError msbuild -p:Configuration="Release" |
|
||||
call :pauseOnError msbuild -p:Configuration="Release" -t:BuildAKVNetFx |
|
||||
call :pauseOnError msbuild -p:Configuration="Release" -t:BuildTestsNetFx -p:TargetNetFxVersion=%netfxVersion% |
|
||||
|
|
||||
echo Running .NET Framework %netfxVersion% Tests ... |
|
||||
call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Configuration="Release" -p:TestTargetOS="Windowsnetfx" -p:TargetNetFxVersion=%netfxVersion% --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -l:"trx;LogFileName=..\..\..\..\..\artifacts\Results\project-%netfxVersion%-functional-anycpu.xml" |
|
||||
call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Configuration="Release" -p:TestTargetOS="Windowsnetfx" -p:TargetNetFxVersion=%netfxVersion% --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -l:"trx;LogFileName=..\..\..\..\..\artifacts\Results\project-%netfxVersion%-manual-anycpu.xml" |
|
||||
|
|
||||
echo Building .NET %netcoreVersion% Tests ... |
|
||||
call pause |
|
||||
call :pauseOnError msbuild -t:Clean |
|
||||
call :pauseOnError msbuild -p:Configuration="Release" |
|
||||
call :pauseOnError msbuild -p:Configuration="Release" -t:BuildAKVNetCoreAllOS |
|
||||
call :pauseOnError msbuild -p:Configuration="Release" -t:BuildTestsNetCore -p:TargetNetCoreVersion=%netcoreVersion% |
|
||||
|
|
||||
echo Running .NET %netcoreVersion% Tests ... |
|
||||
call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Configuration="Release" -p:TestTargetOS="Windowsnetcoreapp" -p:TargetNetCoreVersion=%netcoreVersion% --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" -l:"trx;LogFileName=..\..\..\..\..\artifacts\Results\project-%netcoreVersion%-functional-anycpu.xml" |
|
||||
call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Configuration="Release" -p:TestTargetOS="Windowsnetcoreapp" -p:TargetNetCoreVersion=%netcoreVersion% --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" -l:"trx;LogFileName=..\..\..\..\..\artifacts\Results\project-%netcoreVersion%-manual-anycpu.xml" |
|
||||
|
|
||||
goto :eof |
|
||||
|
|
||||
:pauseOnError |
|
||||
%* |
|
||||
if ERRORLEVEL 1 pause |
|
||||
goto :eof |
|
@ -1,8 +0,0 @@ |
|||||
dotnet msbuild -p:Configuration="Release" -t:Clean,BuildAll -p:GenerateDocumentationFile=false |
|
||||
echo Building Add-Ons |
|
||||
dotnet msbuild -p:Configuration="Release" -t:BuildAKVNetCore -p:OSGroup=Unix -p:Platform=AnyCPU |
|
||||
echo Building tests |
|
||||
dotnet msbuild -p:Configuration="Release" -t:BuildTestsNetCore -p:OSGroup=Unix -p:Platform=AnyCPU |
|
||||
echo Running SqlClient test suite |
|
||||
dotnet test "src/Microsoft.Data.SqlClient/tests/FunctionalTests/Microsoft.Data.SqlClient.Tests.csproj" -p:Platform="AnyCPU" -p:Configuration="Release" -p:TestTargetOS="Unixnetcoreapp" --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonlinuxtests&category!=nonuaptests" |
|
||||
dotnet test "src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Platform="AnyCPU" -p:Configuration="Release" -p:TestTargetOS="Unixnetcoreapp" --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonlinuxtests&category!=nonuaptests" |
|
@ -1,12 +0,0 @@ |
|||||
call :pauseOnError msbuild -p:configuration=Release -t:clean |
|
||||
call :pauseOnError msbuild -p:configuration=Release -t:BuildAllConfigurations |
|
||||
call :pauseOnError msbuild -p:configuration=Release -t:BuildAKVNetFx |
|
||||
call :pauseOnError msbuild -p:configuration=Release -t:BuildAKVNetCoreAllOS |
|
||||
call :pauseOnError msbuild -p:configuration=Release -t:GenerateAKVProviderNugetPackage |
|
||||
|
|
||||
goto :eof |
|
||||
|
|
||||
:pauseOnError |
|
||||
%* |
|
||||
if ERRORLEVEL 1 pause |
|
||||
goto :eof |
|
@ -1,43 +0,0 @@ |
|||||
#Purpose: Updates SNI Version |
|
||||
Write-Host "SNI Version to test = 123" |
|
||||
|
|
||||
##Get the shared SNI Version from the downloaded artifact |
|
||||
#$SharedSNIVersion = Get-Content -path "$(Pipeline.Workspace)/SharedSNIVersion.txt" |
|
||||
|
|
||||
#Get the SNI Version to test from the user entered version. |
|
||||
$SharedSNIVersion = "123" |
|
||||
|
|
||||
# define file to update |
|
||||
$PropsPath = 'C:\Users\mdaigle\SqlClient\tools\props\Versions.props' |
|
||||
type $PropsPath |
|
||||
|
|
||||
# new version number to update to |
|
||||
##Write-Host "SNI Version to test = $(SNIValidationVersion)" |
|
||||
Write-Host "SNI Version to test = $SharedSNIVersion" |
|
||||
|
|
||||
|
|
||||
# define an xml object |
|
||||
$xml = New-Object XML |
|
||||
|
|
||||
# load content of xml from file defined above |
|
||||
$xml.Load($PropsPath) |
|
||||
|
|
||||
# define namespace used to read a node |
|
||||
$nsm = New-Object Xml.XmlNamespaceManager($xml.NameTable) |
|
||||
$nsm.AddNamespace('ns', $xml.DocumentElement.NamespaceURI) |
|
||||
$netFxSniVersion = $xml.SelectSingleNode('//ns:MicrosoftDataSqlClientSniVersion', $nsm) |
|
||||
|
|
||||
Write-Host "Node NetFx SNI Version = $($netFxSniVersion.InnerText)" |
|
||||
|
|
||||
# update the node inner text |
|
||||
$netFxSniVersion.InnerText = "$SharedSNIVersion" |
|
||||
|
|
||||
$netCoreSniVersion = $xml.SelectSingleNode('//ns:MicrosoftDataSqlClientSNIRuntimeVersion', $nsm) |
|
||||
|
|
||||
# update the node inner text |
|
||||
$netCoreSniVersion.InnerText = "$SharedSNIVersion" |
|
||||
|
|
||||
# save the xml file |
|
||||
$xml.Save($PropsPath) |
|
||||
|
|
||||
type $PropsPath |
|
Write
Preview
Loading…
Cancel
Save
Reference in new issue