Skip to content

Commit

Permalink
Multi-target Orleans sln and tests (dotnet#6190)
Browse files Browse the repository at this point in the history
  • Loading branch information
ReubenBond authored and sergeybykov committed Dec 27, 2019
1 parent d1a9196 commit 6a61a93
Show file tree
Hide file tree
Showing 125 changed files with 340 additions and 398 deletions.
44 changes: 21 additions & 23 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -40,37 +40,35 @@
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
</PropertyGroup>

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TestProjectTargetFramework>net461</TestProjectTargetFramework>
</PropertyGroup>

<!-- Shared Package Versions -->
<PropertyGroup>
<!-- System packages -->
<SystemRuntimeVersion>4.3.1</SystemRuntimeVersion>
<SystemDataSqlClientVersion>4.7.0</SystemDataSqlClientVersion>
<SystemDataSqlClientVersion>4.8.0</SystemDataSqlClientVersion>
<SystemDataCommonVersion>4.3.0</SystemDataCommonVersion>

<SystemCollectionsImmutableVersion>1.6.0</SystemCollectionsImmutableVersion>
<SystemRuntimeCompilerServicesUnsafeVersion>4.6.0</SystemRuntimeCompilerServicesUnsafeVersion>
<SystemDiagnosticsEventLogVersion>4.7.0</SystemDiagnosticsEventLogVersion>
<SystemConfigurationConfigurationManagerVersion>4.7.0</SystemConfigurationConfigurationManagerVersion>
<SystemCollectionsImmutableVersion>1.7.0</SystemCollectionsImmutableVersion>
<SystemRuntimeCompilerServicesUnsafeVersion>4.7.0</SystemRuntimeCompilerServicesUnsafeVersion>
<SystemNetHttpVersion>4.3.4</SystemNetHttpVersion>
<SystemReflectionMetadataVersion>1.7.0</SystemReflectionMetadataVersion>
<SystemReflectionTypeExtensionsVersion>4.6.0</SystemReflectionTypeExtensionsVersion>
<SystemNetNameResolutionVersion>4.3.0</SystemNetNameResolutionVersion>
<SystemReflectionMetadataVersion>1.8.0</SystemReflectionMetadataVersion>
<SystemReflectionTypeExtensionsVersion>4.7.0</SystemReflectionTypeExtensionsVersion>
<SystemValueTupleVersion>4.5.0</SystemValueTupleVersion>
<SystemReflectionEmitVersion>4.6.0</SystemReflectionEmitVersion>
<SystemReflectionEmitVersion>4.7.0</SystemReflectionEmitVersion>
<SystemThreadingTasksExtensionsVersion>4.5.3</SystemThreadingTasksExtensionsVersion>
<SystemThreadingChannelsVersion>4.6.0</SystemThreadingChannelsVersion>
<SystemThreadingChannelsVersion>4.7.0</SystemThreadingChannelsVersion>
<SystemBuffersVersion>4.5.0</SystemBuffersVersion>
<SystemMemoryVersion>4.5.3</SystemMemoryVersion>
<SystemIOPipelinesVersion>4.6.0</SystemIOPipelinesVersion>
<SystemCodeDomVersion>4.6.0</SystemCodeDomVersion>
<SystemIOPipelinesVersion>4.7.0</SystemIOPipelinesVersion>
<SystemCodeDomVersion>4.7.0</SystemCodeDomVersion>
<SystemSecurityPermissionsVersion>4.7.0</SystemSecurityPermissionsVersion>

<!-- Microsoft packages -->
<MicrosoftBuildVersion>16.3.0</MicrosoftBuildVersion>
<MicrosoftCodeAnalysisVersion>3.3.1</MicrosoftCodeAnalysisVersion>
<MicrosoftWin32RegistryVersion>4.6.0</MicrosoftWin32RegistryVersion>
<MicrosoftBclAsyncInterfacesVersion>1.0.0</MicrosoftBclAsyncInterfacesVersion>
<MicrosoftBuildVersion>16.4.0</MicrosoftBuildVersion>
<MicrosoftCodeAnalysisVersion>3.4.0</MicrosoftCodeAnalysisVersion>
<MicrosoftWin32RegistryVersion>4.7.0</MicrosoftWin32RegistryVersion>
<MicrosoftBclAsyncInterfacesVersion>1.1.0</MicrosoftBclAsyncInterfacesVersion>
<MicrosoftNETFrameworkReferenceAssembliesVersion>1.0.0</MicrosoftNETFrameworkReferenceAssembliesVersion>

<MicrosoftAspNetCoreConnectionsAbstractionsVersion>3.0.0</MicrosoftAspNetCoreConnectionsAbstractionsVersion>
Expand All @@ -91,7 +89,7 @@
<MicrosoftAzureEventHubsVersion>4.1.0</MicrosoftAzureEventHubsVersion>
<MicrosoftAzureStorageBlobVersion>11.1.0</MicrosoftAzureStorageBlobVersion>
<MicrosoftAzureStorageQueueVersion>11.1.0</MicrosoftAzureStorageQueueVersion>
<MicrosoftDataSQLiteVersion>3.0.0</MicrosoftDataSQLiteVersion>
<MicrosoftDataSQLiteVersion>3.1.0</MicrosoftDataSQLiteVersion>
<MicrosoftServiceFabricServicesVersion>3.4.664</MicrosoftServiceFabricServicesVersion>

<FSharpCoreVersion>4.7.0</FSharpCoreVersion>
Expand All @@ -104,7 +102,7 @@
<GoogleCloudPubSubV1Version>1.0.0-beta13</GoogleCloudPubSubV1Version>
<GoogleProtobufVersion>3.4.0</GoogleProtobufVersion>
<ProtobufNetVersion>2.3.7</ProtobufNetVersion>
<MySqlDataVersion>6.9.9</MySqlDataVersion>
<MySqlDataVersion>8.0.18</MySqlDataVersion>
<NewRelicAgentApiVersion>8.0.0.0</NewRelicAgentApiVersion>
<NewtonsoftJsonVersion>10.0.3</NewtonsoftJsonVersion>
<NpgsqlVersion>3.1.9</NpgsqlVersion>
Expand All @@ -114,8 +112,8 @@

<!-- Test related packages -->
<FluentAssertionsVersion>4.19.4</FluentAssertionsVersion>
<MicrosoftTestSdkVersion>16.3.0</MicrosoftTestSdkVersion>
<BenchmarkDotNetVersion>0.11.5</BenchmarkDotNetVersion>
<MicrosoftTestSdkVersion>16.4.0</MicrosoftTestSdkVersion>
<BenchmarkDotNetVersion>0.12.0</BenchmarkDotNetVersion>
<XunitSkippableFactVersion>1.3.12</XunitSkippableFactVersion>
<DotNetxUnitVersion>2.3.1</DotNetxUnitVersion>
<xUnitVersion>2.4.1</xUnitVersion>
Expand Down
6 changes: 3 additions & 3 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<PropertyGroup Condition=" '$(OrleansBuildTimeCodeGen)' == 'true' ">
<DotNetHost Condition="'$(DotNetHost)' == ''">dotnet</DotNetHost>
<Asm>Orleans.CodeGenerator.MSBuild.Bootstrap</Asm>
<OrleansCodeGenCoreAssembly>$(MSBuildThisFileDirectory)src/BootstrapBuild/$(Asm)/bin/$(Configuration)/publish/netcoreapp3.0/$(Asm).dll</OrleansCodeGenCoreAssembly>
<OrleansCodeGenTasksAssembly>$(MSBuildThisFileDirectory)src/BootstrapBuild/$(Asm)/bin/$(Configuration)/publish/netcoreapp3./Orleans.CodeGenerator.MSBuild.Tasks.dll</OrleansCodeGenTasksAssembly>
<OrleansCodeGenCoreAssembly>$(MSBuildThisFileDirectory)src/BootstrapBuild/$(Asm)/bin/$(Configuration)/publish/netcoreapp3.1/$(Asm).dll</OrleansCodeGenCoreAssembly>
<OrleansCodeGenTasksAssembly>$(MSBuildThisFileDirectory)src/BootstrapBuild/$(Asm)/bin/$(Configuration)/publish/netcoreapp3.1/Orleans.CodeGenerator.MSBuild.Tasks.dll</OrleansCodeGenTasksAssembly>
<OrleansBootstrapBuildProject>$(MSBuildThisFileDirectory)src/BootstrapBuild/Orleans.CodeGenerator.MSBuild.Bootstrap/Orleans.CodeGenerator.MSBuild.Bootstrap.csproj</OrleansBootstrapBuildProject>
</PropertyGroup>

Expand All @@ -18,7 +18,7 @@
<Project>{CB36EF45-6E90-443F-AEE4-394677068147}</Project>
<Name>Orleans.CodeGenerator.MSBuild.Bootstrap</Name>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<AssetTargetFallback>netcoreapp3.0</AssetTargetFallback>
<AssetTargetFallback>netcoreapp3.1</AssetTargetFallback>
<Visible>false</Visible>
<!-- Workaround. See: https://github.com/dotnet/sdk/issues/939#issuecomment-284641613 -->
<!-- This causes the 'Dependency' node in VS to show a warning icon. See https://github.com/dotnet/project-system/issues/2928 -->
Expand Down
18 changes: 12 additions & 6 deletions Parallel-Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,15 @@ $ExecuteCmd =

$cmdline = "& `"" + $dotnet1 + "`" " + $args1

Invoke-Expression $cmdline
if ($LASTEXITCODE -ne 0)
Invoke-Expression $cmdline;
$cmdExitCode = $LASTEXITCODE;
if ($cmdExitCode -ne 0)
{
Throw "Error when running tests"
Throw "Error when running tests. Command: `"$cmdline`". Exit Code: $cmdExitCode"
}
else
{
Write-Host "Tests completed. Command: `"$cmdline`""
}
}

Expand All @@ -58,10 +63,11 @@ foreach ($d in $directories)
}

if (-not (Receive-CompletedJobs)) { $failed = $true }

if (-not $testFilter.StartsWith('"')) { $testFilter = "`"$testFilter"; }
if (-not $testFilter.EndsWith('"')) { $testFilter = "$testFilter`""; }

$xmlName = 'xUnit-Results-' + [System.IO.Path]::GetFileName($d) + '.xml'
$outXml = $(Join-Path $outDir $xmlName)
$cmdLine = 'xunit ' + $testFilter + ' -xml ' + $outXml + ' -parallel none -noshadow -nobuild -configuration ' + $env:BuildConfiguration
$cmdLine = 'test --no-build --configuration "' + $env:BuildConfiguration + '" --filter ' + $testFilter + ' --logger "trx" -- -parallel none -noshadow'
Write-Host $dotnet $cmdLine
Start-Job $ExecuteCmd -ArgumentList @($dotnet, $cmdLine, $d) -Name $([System.IO.Path]::GetFileName($d)) | Out-Null
Write-Host ''
Expand Down
4 changes: 2 additions & 2 deletions Test.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ rem %CMDHOME%\test\NetCore.Tests

rem %CMDHOME%\test\Analyzers.Tests

if []==[%TEST_FILTERS%] set TEST_FILTERS=-trait Category=BVT -trait Category=SlowBVT
if []==[%TEST_FILTERS%] set "TEST_FILTERS=Category=BVT^|Category=SlowBVT"

@Echo Test assemblies = %TESTS%
@Echo Test filters = %TEST_FILTERS%

PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& ./Parallel-Tests.ps1 -directories %TESTS% -testFilter \"%TEST_FILTERS%\" -outDir '%TestResultDir%' -dotnet '%_dotnet%'"
PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& ./Parallel-Tests.ps1 -directories %TESTS% -testFilter '%TEST_FILTERS%' -outDir '%TestResultDir%' -dotnet '%_dotnet%'"
set testresult=%errorlevel%
popd
endlocal&set testresult=%testresult%
Expand Down
2 changes: 1 addition & 1 deletion TestAll.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set CMDHOME=%CMDHOME:~0,-1%

@REM Due to more of Windows .cmd script parameter passing quirks, we can't pass this value as cmdline argument,
@REM so we need to pass it in through the back door as environment variable, scoped by setlocal
set TEST_FILTERS=-trait Category=BVT -trait Category=SlowBVT -trait Category=Functional
set TEST_FILTERS=Category=BVT^|Category=SlowBVT^|Category=Functional

@REM Note: We transfer _complete_ control to the Test.cmd script here because we don't use CALL.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<Title>Microsoft Orleans clustering provider for AWS DynamoDB</Title>
<Description>Microsoft Orleans clustering provider backed by AWS DynamoDB</Description>
<PackageTags>$(PackageTags) AWS DynamoDB</PackageTags>
<TargetFrameworks>$(StandardTargetFrameworks)</TargetFrameworks>
</PropertyGroup>

<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<Title>Microsoft Orleans Persistence DynamoDB</Title>
<Description>Microsoft Orleans persistence providers for AWS DynamoDB</Description>
<PackageTags>$(PackageTags) AWS DynamoDB</PackageTags>
<TargetFrameworks>$(StandardTargetFrameworks)</TargetFrameworks>
</PropertyGroup>

<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<Title>Microsoft Orleans Reminders DynamoDB</Title>
<Description>Microsoft Orleans reminders provider for AWS DynamoDB</Description>
<PackageTags>$(PackageTags) AWS DynamoDB</PackageTags>
<TargetFrameworks>$(StandardTargetFrameworks)</TargetFrameworks>
</PropertyGroup>

<PropertyGroup>
Expand Down
1 change: 1 addition & 0 deletions src/AWS/Orleans.Streaming.SQS/Orleans.Streaming.SQS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<Title>Microsoft Orleans Streaming AWS SQS</Title>
<Description>Microsoft Orleans streaming provider for AWS SQS</Description>
<PackageTags>$(PackageTags) AWS SQS</PackageTags>
<TargetFrameworks>$(StandardTargetFrameworks)</TargetFrameworks>
</PropertyGroup>

<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<Title>Microsoft Orleans clustering provider for ADO.NET Providers</Title>
<Description>Microsoft Orleans clustering provider backed by ADO.NET Providers</Description>
<PackageTags>$(PackageTags) ADO.NET SQL MySQL PostgreSQL Oracle</PackageTags>
<TargetFrameworks>$(StandardTargetFrameworks)</TargetFrameworks>
</PropertyGroup>

<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<Title>Microsoft Orleans Persistence ADO.NET Providers</Title>
<Description>Microsoft Orleans persistence providers for ADO.NET Providers</Description>
<PackageTags>$(PackageTags) ADO.NET SQL MySQL PostgreSQL Oracle</PackageTags>
<TargetFrameworks>$(StandardTargetFrameworks)</TargetFrameworks>
</PropertyGroup>

<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<Title>Microsoft Orleans Reminders ADO.NET Providers</Title>
<Description>Microsoft Orleans reminders provider for ADO.NET Providers</Description>
<PackageTags>$(PackageTags) ADO.NET SQL MySQL PostgreSQL Oracle</PackageTags>
<TargetFrameworks>$(StandardTargetFrameworks)</TargetFrameworks>
</PropertyGroup>

<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<Title>Microsoft Orleans clustering provider for Azure Table Storage</Title>
<Description>Microsoft Orleans clustering provider backed by Azure Table Storage</Description>
<PackageTags>$(PackageTags) Azure Table Storage</PackageTags>
<TargetFrameworks>$(StandardTargetFrameworks)</TargetFrameworks>
</PropertyGroup>

<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<Title>Microsoft Orleans Hosting on Azure Cloud Services</Title>
<Description>Hosting utilities for Azure Cloud Services of Microsoft Orleans.</Description>
<PackageTags>$(PackageTags) Azure Cloud Services</PackageTags>
<TargetFrameworks>$(StandardTargetFrameworks)</TargetFrameworks>
</PropertyGroup>

<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<Title>Microsoft Orleans Service Fabric Hosting Support</Title>
<Description>Support for hosting Microsoft Orleans on Service Fabric.</Description>
<PackageTags>$(PackageTags) Azure ServiceFabric</PackageTags>
<TargetFrameworks>$(StandardTargetFrameworks)</TargetFrameworks>
</PropertyGroup>

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>Orleans.Hosting.ServiceFabric</AssemblyName>
<RootNamespace>Orleans.Hosting.ServiceFabric</RootNamespace>
<PlatformTarget>x64</PlatformTarget>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<Title>Microsoft Orleans Persistence Azure Storage</Title>
<Description>Microsoft Orleans persistence providers for Azure Storage</Description>
<PackageTags>$(PackageTags) Azure Table Blob Storage</PackageTags>
<TargetFrameworks>$(StandardTargetFrameworks)</TargetFrameworks>
</PropertyGroup>

<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<Title>Microsoft Orleans Reminders Azure Table Storage</Title>
<Description>Microsoft Orleans reminders provider for Azure Table Storage</Description>
<PackageTags>$(PackageTags) Azure Table Storage</PackageTags>
<TargetFrameworks>$(StandardTargetFrameworks)</TargetFrameworks>
</PropertyGroup>

<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<Title>Microsoft Orleans Streaming Azure Storage</Title>
<Description>Microsoft Orleans streaming provider for Azure Queue Storage</Description>
<PackageTags>$(PackageTags) Azure Table Blob Storage</PackageTags>
<TargetFrameworks>$(StandardTargetFrameworks)</TargetFrameworks>
</PropertyGroup>

<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<Description>Microsoft Orleans. streaming provider for Azure EventHubs</Description>
<PackageTags>$(PackageTags) Azure EventHubs</PackageTags>
<DefineConstants>$(DefineConstants);ORLEANS_EVENTHUBS</DefineConstants>
<TargetFrameworks>$(StandardTargetFrameworks)</TargetFrameworks>
</PropertyGroup>

<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<Title>Microsoft Orleans Transactions on Azure</Title>
<Description>Azure Transaction library of Microsoft Orleans used on the server.</Description>
<PackageTags>$(PackageTags) Azure Transactions</PackageTags>
<TargetFrameworks>$(StandardTargetFrameworks)</TargetFrameworks>
</PropertyGroup>

<PropertyGroup>
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk" DefaultTargets="Build;PostBuildPublish">
<Project Sdk="Microsoft.NET.Sdk" DefaultTargets="Build;PostBuildPublish">

<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<OutputType>Exe</OutputType>
<IsPackable>false</IsPackable>
<NoPackageAnalysis>true</NoPackageAnalysis>
Expand Down
Loading

0 comments on commit 6a61a93

Please sign in to comment.