From aa8a8b7471f71c10e697e6ad8cf9e2e0f52eca0b Mon Sep 17 00:00:00 2001 From: Pavel Krymets Date: Wed, 25 Jul 2018 13:11:40 -0700 Subject: [PATCH 1/2] Skip IIS Jenkins (#1094) --- build/buildpipeline/windows.groovy | 2 +- test/IIS.FunctionalTests/RequiresIISAttribute.cs | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/build/buildpipeline/windows.groovy b/build/buildpipeline/windows.groovy index 3aa3d99283..dcd6894cb7 100644 --- a/build/buildpipeline/windows.groovy +++ b/build/buildpipeline/windows.groovy @@ -9,7 +9,7 @@ simpleNode('Windows.10.Amd64.EnterpriseRS3.ASPNET.Open') { } stage ('Build') { def logFolder = getLogFolder() - def environment = "\$env:ASPNETCORE_TEST_LOG_DIR='${WORKSPACE}\\${logFolder}'" + def environment = "\$env:ASPNETCORE_TEST_LOG_DIR='${WORKSPACE}\\${logFolder}';\$env:ASPNETCORE_TEST_SKIP_IIS='true';" bat "powershell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command \"&.\\tools\\update_schema.ps1;${environment};&.\\run.cmd -CI default-build /p:Configuration=${params.Configuration}\"" } } diff --git a/test/IIS.FunctionalTests/RequiresIISAttribute.cs b/test/IIS.FunctionalTests/RequiresIISAttribute.cs index de0e4eb805..9befaeba96 100644 --- a/test/IIS.FunctionalTests/RequiresIISAttribute.cs +++ b/test/IIS.FunctionalTests/RequiresIISAttribute.cs @@ -27,6 +27,12 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests static RequiresIISAttribute() { + if (Environment.GetEnvironmentVariable("ASPNETCORE_TEST_SKIP_IIS") == "true") + { + _skipReasonStatic = "Test skipped using ASPNETCORE_TEST_SKIP_IIS environment variable"; + return; + } + if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { _skipReasonStatic = "IIS tests can only be run on Windows"; From ba18129d7929cd0e60897e1c1f3025cea2a0b5c5 Mon Sep 17 00:00:00 2001 From: Justin Kotalik Date: Wed, 25 Jul 2018 15:26:01 -0700 Subject: [PATCH 2/2] Skip win7 tests (#1096) --- test/IIS.FunctionalTests/Properties/AssemblyInfo.cs | 11 +++++++++++ .../Properties/AssemblyInfo.cs | 0 2 files changed, 11 insertions(+) create mode 100644 test/IIS.FunctionalTests/Properties/AssemblyInfo.cs rename test/{Common.FunctionalTests => IISExpress.FunctionalTests}/Properties/AssemblyInfo.cs (100%) diff --git a/test/IIS.FunctionalTests/Properties/AssemblyInfo.cs b/test/IIS.FunctionalTests/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..c6007ab5fe --- /dev/null +++ b/test/IIS.FunctionalTests/Properties/AssemblyInfo.cs @@ -0,0 +1,11 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests; +using Microsoft.AspNetCore.Testing.xunit; +using Xunit; + +[assembly: CollectionBehavior(DisableTestParallelization = true)] +[assembly: RequiresIIS] +[assembly: OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, SkipReason = "https://github.com/aspnet/IISIntegration/issues/1069")] + diff --git a/test/Common.FunctionalTests/Properties/AssemblyInfo.cs b/test/IISExpress.FunctionalTests/Properties/AssemblyInfo.cs similarity index 100% rename from test/Common.FunctionalTests/Properties/AssemblyInfo.cs rename to test/IISExpress.FunctionalTests/Properties/AssemblyInfo.cs