diff --git a/Directory.Build.props b/Directory.Build.props index be33f7fb36..974ca8e612 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,4 +1,8 @@  + + diff --git a/korebuild-lock.txt b/korebuild-lock.txt index 36d8056037..95f4613014 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.1.0-preview1-15550 -commithash:0dd080d0d87b4d1966ec0af9961dc8bacc04f84f +version:2.1.0-preview1-15567 +commithash:903e3104807b1bb8cddd28bdef205b1e2dc021d1 diff --git a/test/Directory.Build.props b/test/Directory.Build.props new file mode 100644 index 0000000000..b6b79cae3b --- /dev/null +++ b/test/Directory.Build.props @@ -0,0 +1,10 @@ + + + + + netcoreapp2.1 + $(DeveloperBuildTestTfms) + netcoreapp2.1;netcoreapp2.0 + $(StandardTestTfms);net461 + + diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs index 2cb20f4370..12649aa148 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs +++ b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs @@ -104,7 +104,7 @@ namespace ServerComparison.FunctionalTests } } } -#elif NETCOREAPP2_0 +#elif NETCOREAPP2_0 || NETCOREAPP2_1 #else #error target frameworks need to be updated #endif diff --git a/test/ServerComparison.FunctionalTests/ResponseTests.cs b/test/ServerComparison.FunctionalTests/ResponseTests.cs index 8636f2f380..b2a3accdc8 100644 --- a/test/ServerComparison.FunctionalTests/ResponseTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseTests.cs @@ -24,15 +24,15 @@ namespace ServerComparison.FunctionalTests { } - [ConditionalTheory] - [OSSkipCondition(OperatingSystems.Linux)] - [OSSkipCondition(OperatingSystems.MacOSX)] +#if NET461 + [Theory] [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] public Task ResponseFormats_Windows_ContentLength(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { return ResponseFormats(serverType, runtimeFlavor, architecture, CheckContentLengthAsync, applicationType); } +#endif [Theory] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] @@ -51,9 +51,8 @@ namespace ServerComparison.FunctionalTests return ResponseFormats(serverType, runtimeFlavor, architecture, CheckContentLengthAsync, applicationType); } - [ConditionalTheory] - [OSSkipCondition(OperatingSystems.Linux)] - [OSSkipCondition(OperatingSystems.MacOSX)] +#if NET461 + [Theory] [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] // IIS will remove the "Connection: close" header https://github.com/aspnet/IISIntegration/issues/7 public Task ResponseFormats_Windows_Http10ConnectionClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) @@ -61,15 +60,15 @@ namespace ServerComparison.FunctionalTests return ResponseFormats(serverType, runtimeFlavor, architecture, CheckHttp10ConnectionCloseAsync, applicationType); } - [ConditionalTheory] - [OSSkipCondition(OperatingSystems.Linux)] - [OSSkipCondition(OperatingSystems.MacOSX)] + + [Theory] [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] // https://github.com/aspnet/WebListener/issues/259 // IIS will remove the "Connection: close" header https://github.com/aspnet/IISIntegration/issues/7 public Task ResponseFormats_Windows_Http11ConnectionClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { return ResponseFormats(serverType, runtimeFlavor, architecture, CheckHttp11ConnectionCloseAsync, applicationType); } +#endif [Theory] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] @@ -87,15 +86,15 @@ namespace ServerComparison.FunctionalTests return ResponseFormats(serverType, runtimeFlavor, architecture, CheckHttp11ConnectionCloseAsync, applicationType); } - [ConditionalTheory] - [OSSkipCondition(OperatingSystems.Linux)] - [OSSkipCondition(OperatingSystems.MacOSX)] +#if NET461 + [Theory] [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] public Task ResponseFormats_Windows_Chunked(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { return ResponseFormats(serverType, runtimeFlavor, architecture, CheckChunkedAsync, applicationType); } +#endif [Theory] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] @@ -114,15 +113,15 @@ namespace ServerComparison.FunctionalTests return ResponseFormats(serverType, runtimeFlavor, architecture, CheckChunkedAsync, applicationType); } - [ConditionalTheory] - [OSSkipCondition(OperatingSystems.Linux)] - [OSSkipCondition(OperatingSystems.MacOSX)] +#if NET461 + [Theory] [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] public Task ResponseFormats_Windows_ManuallyChunk(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { return ResponseFormats(serverType, runtimeFlavor, architecture, CheckManuallyChunkedAsync, applicationType); } +#endif [Theory] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] @@ -141,15 +140,15 @@ namespace ServerComparison.FunctionalTests return ResponseFormats(serverType, runtimeFlavor, architecture, CheckManuallyChunkedAsync, applicationType); } - [ConditionalTheory] - [OSSkipCondition(OperatingSystems.Linux)] - [OSSkipCondition(OperatingSystems.MacOSX)] +#if NET461 + [Theory] // [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] // https://github.com/aspnet/IISIntegration/issues/7 [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] public Task ResponseFormats_Windows_ManuallyChunkAndClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { return ResponseFormats(serverType, runtimeFlavor, architecture, CheckManuallyChunkedAndCloseAsync, applicationType); } +#endif [Theory] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] @@ -161,6 +160,17 @@ namespace ServerComparison.FunctionalTests private async Task ResponseFormats(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, Func scenario, ApplicationType applicationType, [CallerMemberName] string testName = null) { + var targetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "net461" : +#if NETCOREAPP2_0 + "netcoreapp2.0"; +#elif NETCOREAPP2_1 + "netcoreapp2.1"; +#elif NET461 +#error Tests targeting CLR must be compiled only on desktop. +#else +#error Target frameworks need to be updated. +#endif + testName = $"{testName}_{serverType}_{runtimeFlavor}_{architecture}_{applicationType}"; using (StartLog(out var loggerFactory, testName)) { diff --git a/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj b/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj index 4fa826e56a..fb1f789be3 100644 --- a/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj +++ b/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj @@ -1,8 +1,7 @@  - netcoreapp2.0;net461 - netcoreapp2.0 + $(StandardTestTfms) diff --git a/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj b/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj index 7053d7b69a..54cc960912 100644 --- a/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj +++ b/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj @@ -1,8 +1,7 @@  - net461;netcoreapp2.0 - netcoreapp2.0 + $(StandardTestTfms) win7-x86;win7-x64;linux-x64;osx-x64