From 69a17d83068055d64b3b3e356a7392e1f384eade Mon Sep 17 00:00:00 2001 From: Justin Kotalik Date: Tue, 23 Oct 2018 09:54:24 -0700 Subject: [PATCH 1/2] update PR --- .appveyor.yml | 2 +- .vsts-pipelines/builds/ci-internal-21.yml | 30 ++++++++++ .vsts-pipelines/templates/build-steps.yml | 42 ++++++++++++++ IISIntegration.NoV1.sln | 17 +++++- IISIntegration.sln | 23 ++++++++ build/build.msbuild | 34 ----------- build/buildpipeline/windows.groovy | 2 +- build/dependencies.props | 14 ++++- build/functional-test-assets.targets | 10 ++++ build/repo.props | 13 ++++- build/repo.targets | 16 ++++-- build/testsite.props | 1 - korebuild-lock.txt | 5 ++ ...osoft.AspNetCore.AspNetCoreModuleV2.nuspec | 3 +- .../CommonLib/ServerErrorHandler.h | 6 +- .../CommonLib/StringHelpers.h | 8 +-- .../Core/IISHttpContext.IO.cs | 12 ++-- .../Core/IO/AsyncIOEngine.cs | 4 +- .../Microsoft.AspNetCore.Server.IIS.csproj | 12 ++++ ...tCore.Server.IntegrationTesting.IIS.csproj | 29 +++------- .../Inprocess/ErrorPagesTests.cs | 36 +++++++++--- .../Inprocess/StartupTests.cs | 0 .../OutOfProcess/GlobalVersionTests.cs | 1 + test/CommonLibTests/utility_tests.cpp | 15 +++++ .../BackwardsCompatibilityTests.cs | 49 ++++++++++++++++ .../DeployerSelector.cs | 13 +++++ ...kwardsCompatibility.FunctionalTests.csproj | 56 +++++++++++++++++++ .../RequiresNewShim.cs | 17 ++++++ test/IIS.FunctionalTests/DeployerSelector.cs | 1 + .../IIS.FunctionalTests.csproj | 3 + test/IIS.FunctionalTests/RequiresNewShim.cs | 17 ++++++ .../Inprocess/StdOutRedirectionTests.cs | 0 .../MofFileTests.cs | 0 .../Properties/AssemblyInfo.cs | 4 +- .../RequiresIISAttribute.cs | 2 +- .../ServicesTests.cs | 0 test/IIS.Tests/ClientDisconnectTests.cs | 6 +- test/IIS.Tests/IIS.Tests.csproj | 5 +- test/IIS.Tests/TestServerTest.cs | 2 +- .../DeployerSelector.cs | 1 + .../IISExpress.FunctionalTests.csproj | 2 + .../Properties/AssemblyInfo.cs | 2 + .../RequiresNewShim.cs | 17 ++++++ version.props | 10 ++++ 44 files changed, 443 insertions(+), 99 deletions(-) create mode 100644 .vsts-pipelines/builds/ci-internal-21.yml delete mode 100644 build/build.msbuild create mode 100644 build/functional-test-assets.targets rename test/{IIS.FunctionalTests => Common.FunctionalTests}/Inprocess/StartupTests.cs (100%) create mode 100644 test/IIS.BackwardsCompatibility.FunctionalTests/BackwardsCompatibilityTests.cs create mode 100644 test/IIS.BackwardsCompatibility.FunctionalTests/DeployerSelector.cs create mode 100644 test/IIS.BackwardsCompatibility.FunctionalTests/IIS.BackwardsCompatibility.FunctionalTests.csproj create mode 100644 test/IIS.BackwardsCompatibility.FunctionalTests/RequiresNewShim.cs create mode 100644 test/IIS.FunctionalTests/RequiresNewShim.cs rename test/{IIS.FunctionalTests => IIS.Shared.FunctionalTests}/Inprocess/StdOutRedirectionTests.cs (100%) rename test/{IIS.FunctionalTests => IIS.Shared.FunctionalTests}/MofFileTests.cs (100%) rename test/{IIS.FunctionalTests => IIS.Shared.FunctionalTests}/Properties/AssemblyInfo.cs (82%) rename test/{IIS.FunctionalTests => IIS.Shared.FunctionalTests}/RequiresIISAttribute.cs (99%) rename test/{IIS.FunctionalTests => IIS.Shared.FunctionalTests}/ServicesTests.cs (100%) create mode 100644 test/IISExpress.FunctionalTests/RequiresNewShim.cs diff --git a/.appveyor.yml b/.appveyor.yml index 2b99c7fb7e..ca883867c8 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -16,7 +16,7 @@ install: - git submodule update --init --recursive - net start w3svc build_script: -- ps: .\run.ps1 default-build +- ps: .\run.ps1 default-build /p:SkipIISBackwardsCompatibilityTests=true clone_depth: 1 environment: global: diff --git a/.vsts-pipelines/builds/ci-internal-21.yml b/.vsts-pipelines/builds/ci-internal-21.yml new file mode 100644 index 0000000000..1506ee3149 --- /dev/null +++ b/.vsts-pipelines/builds/ci-internal-21.yml @@ -0,0 +1,30 @@ +trigger: +- release/2.2 + +resources: + repositories: + - repository: buildtools + type: git + name: aspnet-BuildTools + ref: refs/heads/release/2.2 + +phases: +- template: .azure\templates\jobs\default-build.yml@buildtools + parameters: + agentOs: Windows + codeSign: false + buildArgs: /p:BuildServerIIS21=true /p:SkipIISExpressTests=true /p:SkipIISBackwardsCompatibilityTests=true + beforeBuild: + - powershell: "& ./tools/UpdateIISExpressCertificate.ps1; & ./tools/update_schema.ps1; & ./tools/SetupTestEnvironment.ps1 SetupDumps" + displayName: Prepare repo + afterBuild: + - powershell: "& ./tools/SetupTestEnvironment.ps1 Shutdown" + displayName: Stop AppVerifier + condition: always() + - task: PublishBuildArtifacts@1 + displayName: Upload logs + condition: eq(variables['system.pullrequest.isfork'], false) + inputs: + artifactName: logs + artifactType: Container + pathtoPublish: artifacts/logs \ No newline at end of file diff --git a/.vsts-pipelines/templates/build-steps.yml b/.vsts-pipelines/templates/build-steps.yml index 36219f533b..a1cd198773 100644 --- a/.vsts-pipelines/templates/build-steps.yml +++ b/.vsts-pipelines/templates/build-steps.yml @@ -2,6 +2,48 @@ phases: - template: .vsts-pipelines/templates/phases/default-build.yml@buildtools parameters: agentOs: Windows + phaseName: IIS_Express_Tests + buildArgs: /p:SkipIISBackwardsCompatibilityTests=true /p:SkipIISTests=true + beforeBuild: + - powershell: "& ./tools/UpdateIISExpressCertificate.ps1; & ./tools/update_schema.ps1; & ./tools/SetupTestEnvironment.ps1 Setup" + displayName: Prepare repo + afterBuild: + - powershell: "& ./tools/SetupTestEnvironment.ps1 Shutdown" + displayName: Stop AppVerifier + condition: always() + - task: PublishBuildArtifacts@1 + displayName: Upload logs + condition: eq(variables['system.pullrequest.isfork'], false) + inputs: + artifactName: logs + artifactType: Container + pathtoPublish: artifacts/logs + +- template: .vsts-pipelines/templates/phases/default-build.yml@buildtools + parameters: + agentOs: Windows + phaseName: IIS_Tests + buildArgs: /p:SkipIISBackwardsCompatibilityTests=true /p:SkipIISExpressTests=true + beforeBuild: + - powershell: "& ./tools/UpdateIISExpressCertificate.ps1; & ./tools/update_schema.ps1; & ./tools/SetupTestEnvironment.ps1 Setup" + displayName: Prepare repo + afterBuild: + - powershell: "& ./tools/SetupTestEnvironment.ps1 Shutdown" + displayName: Stop AppVerifier + condition: always() + - task: PublishBuildArtifacts@1 + displayName: Upload logs + condition: eq(variables['system.pullrequest.isfork'], false) + inputs: + artifactName: logs + artifactType: Container + pathtoPublish: artifacts/logs + +- template: .vsts-pipelines/templates/phases/default-build.yml@buildtools + parameters: + agentOs: Windows + phaseName: IIS_BackCompat_Tests + buildArgs: /p:SkipIISTests=true /p:SkipIISExpressTests=true beforeBuild: - powershell: "& ./tools/UpdateIISExpressCertificate.ps1; & ./tools/update_schema.ps1; & ./tools/SetupTestEnvironment.ps1 Setup" displayName: Prepare repo diff --git a/IISIntegration.NoV1.sln b/IISIntegration.NoV1.sln index cbe801fc32..2ee59d14bf 100644 --- a/IISIntegration.NoV1.sln +++ b/IISIntegration.NoV1.sln @@ -36,10 +36,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{7E80C58E ProjectSection(SolutionItems) = preProject build\applicationhost.config = build\applicationhost.config build\applicationhost.iis.config = build\applicationhost.iis.config - build\build.msbuild = build\build.msbuild build\Build.Settings = build\Build.Settings build\Config.Definitions.Props = build\Config.Definitions.Props build\dependencies.props = build\dependencies.props + build\functional-test-assets.targets = build\functional-test-assets.targets build\Key.snk = build\Key.snk build\launchSettings.json = build\launchSettings.json build\native.targets = build\native.targets @@ -113,6 +113,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IIS.Tests", "test\IIS.Tests EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Common.Tests", "test\Common.Tests\Common.Tests.csproj", "{D17B7B35-5361-4A50-B499-E03E5C3CC095}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IIS.BackwardsCompatibility.FunctionalTests", "test\IIS.BackwardsCompatibility.FunctionalTests\IIS.BackwardsCompatibility.FunctionalTests.csproj", "{582B07BC-73F4-4689-8557-B039298BD82C}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -383,6 +385,18 @@ Global {D17B7B35-5361-4A50-B499-E03E5C3CC095}.Release|x64.Build.0 = Release|Any CPU {D17B7B35-5361-4A50-B499-E03E5C3CC095}.Release|x86.ActiveCfg = Release|Any CPU {D17B7B35-5361-4A50-B499-E03E5C3CC095}.Release|x86.Build.0 = Release|Any CPU + {582B07BC-73F4-4689-8557-B039298BD82C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {582B07BC-73F4-4689-8557-B039298BD82C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {582B07BC-73F4-4689-8557-B039298BD82C}.Debug|x64.ActiveCfg = Debug|Any CPU + {582B07BC-73F4-4689-8557-B039298BD82C}.Debug|x64.Build.0 = Debug|Any CPU + {582B07BC-73F4-4689-8557-B039298BD82C}.Debug|x86.ActiveCfg = Debug|Any CPU + {582B07BC-73F4-4689-8557-B039298BD82C}.Debug|x86.Build.0 = Debug|Any CPU + {582B07BC-73F4-4689-8557-B039298BD82C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {582B07BC-73F4-4689-8557-B039298BD82C}.Release|Any CPU.Build.0 = Release|Any CPU + {582B07BC-73F4-4689-8557-B039298BD82C}.Release|x64.ActiveCfg = Release|Any CPU + {582B07BC-73F4-4689-8557-B039298BD82C}.Release|x64.Build.0 = Release|Any CPU + {582B07BC-73F4-4689-8557-B039298BD82C}.Release|x86.ActiveCfg = Release|Any CPU + {582B07BC-73F4-4689-8557-B039298BD82C}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -413,6 +427,7 @@ Global {34135ED7-313D-4E68-860C-D6B51AA28523} = {04B1EDB6-E967-4D25-89B9-E6F8304038CD} {C0310D84-BC2F-4B2E-870E-D35044DB3E3E} = {EF30B533-D715-421A-92B7-92FEF460AC9C} {D17B7B35-5361-4A50-B499-E03E5C3CC095} = {EF30B533-D715-421A-92B7-92FEF460AC9C} + {582B07BC-73F4-4689-8557-B039298BD82C} = {EF30B533-D715-421A-92B7-92FEF460AC9C} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {DB4F868D-E1AE-4FD7-9333-69FA15B268C5} diff --git a/IISIntegration.sln b/IISIntegration.sln index 34a5050f7e..6e8b394d5a 100644 --- a/IISIntegration.sln +++ b/IISIntegration.sln @@ -121,6 +121,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IIS.Tests", "test\IIS.Tests EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Common.Tests", "test\Common.Tests\Common.Tests.csproj", "{A641A208-2974-4E48-BCFF-54E3AAFA4FB9}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IIS.BackwardsCompatibility.FunctionalTests", "test\IIS.BackwardsCompatibility.FunctionalTests\IIS.BackwardsCompatibility.FunctionalTests.csproj", "{28055B05-25D4-4F17-9F36-A1D09FDDA607}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -637,6 +639,26 @@ Global {A641A208-2974-4E48-BCFF-54E3AAFA4FB9}.Release|x64.Build.0 = Release|Any CPU {A641A208-2974-4E48-BCFF-54E3AAFA4FB9}.Release|x86.ActiveCfg = Release|Any CPU {A641A208-2974-4E48-BCFF-54E3AAFA4FB9}.Release|x86.Build.0 = Release|Any CPU + {28055B05-25D4-4F17-9F36-A1D09FDDA607}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {28055B05-25D4-4F17-9F36-A1D09FDDA607}.Debug|Any CPU.Build.0 = Debug|Any CPU + {28055B05-25D4-4F17-9F36-A1D09FDDA607}.Debug|x64.ActiveCfg = Debug|Any CPU + {28055B05-25D4-4F17-9F36-A1D09FDDA607}.Debug|x64.Build.0 = Debug|Any CPU + {28055B05-25D4-4F17-9F36-A1D09FDDA607}.Debug|x86.ActiveCfg = Debug|Any CPU + {28055B05-25D4-4F17-9F36-A1D09FDDA607}.Debug|x86.Build.0 = Debug|Any CPU + {28055B05-25D4-4F17-9F36-A1D09FDDA607}.NativeDebug|Any CPU.ActiveCfg = Debug|Any CPU + {28055B05-25D4-4F17-9F36-A1D09FDDA607}.NativeDebug|Any CPU.Build.0 = Debug|Any CPU + {28055B05-25D4-4F17-9F36-A1D09FDDA607}.NativeDebug|x64.ActiveCfg = Debug|Any CPU + {28055B05-25D4-4F17-9F36-A1D09FDDA607}.NativeDebug|x86.ActiveCfg = Debug|Any CPU + {28055B05-25D4-4F17-9F36-A1D09FDDA607}.NativeRelease|Any CPU.ActiveCfg = Release|Any CPU + {28055B05-25D4-4F17-9F36-A1D09FDDA607}.NativeRelease|Any CPU.Build.0 = Release|Any CPU + {28055B05-25D4-4F17-9F36-A1D09FDDA607}.NativeRelease|x64.ActiveCfg = Release|Any CPU + {28055B05-25D4-4F17-9F36-A1D09FDDA607}.NativeRelease|x86.ActiveCfg = Release|Any CPU + {28055B05-25D4-4F17-9F36-A1D09FDDA607}.Release|Any CPU.ActiveCfg = Release|Any CPU + {28055B05-25D4-4F17-9F36-A1D09FDDA607}.Release|Any CPU.Build.0 = Release|Any CPU + {28055B05-25D4-4F17-9F36-A1D09FDDA607}.Release|x64.ActiveCfg = Release|Any CPU + {28055B05-25D4-4F17-9F36-A1D09FDDA607}.Release|x64.Build.0 = Release|Any CPU + {28055B05-25D4-4F17-9F36-A1D09FDDA607}.Release|x86.ActiveCfg = Release|Any CPU + {28055B05-25D4-4F17-9F36-A1D09FDDA607}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -670,6 +692,7 @@ Global {CE4FB142-91FB-4B34-BC96-A31120EF4009} = {04B1EDB6-E967-4D25-89B9-E6F8304038CD} {A091777D-66B3-42E1-B95C-85322DE40706} = {EF30B533-D715-421A-92B7-92FEF460AC9C} {A641A208-2974-4E48-BCFF-54E3AAFA4FB9} = {EF30B533-D715-421A-92B7-92FEF460AC9C} + {28055B05-25D4-4F17-9F36-A1D09FDDA607} = {EF30B533-D715-421A-92B7-92FEF460AC9C} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {DB4F868D-E1AE-4FD7-9333-69FA15B268C5} diff --git a/build/build.msbuild b/build/build.msbuild deleted file mode 100644 index c97f1a53b5..0000000000 --- a/build/build.msbuild +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build/buildpipeline/windows.groovy b/build/buildpipeline/windows.groovy index 35bb4737ae..cc42e9ab4f 100644 --- a/build/buildpipeline/windows.groovy +++ b/build/buildpipeline/windows.groovy @@ -10,6 +10,6 @@ simpleNode('Windows.10.Amd64.EnterpriseRS3.ASPNET.Open') { stage ('Build') { def logFolder = getLogFolder() def environment = "\$env:ASPNETCORE_TEST_LOG_DIR='${WORKSPACE}\\${logFolder}'" - bat "powershell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command \"${environment};&.\\tools\\SetupTestEnvironment.ps1 SetupDumps;&.\\tools\\update_schema.ps1;&.\\tools\\UpdateIISExpressCertificate.ps1;&.\\run.cmd -CI default-build /p:Configuration=${params.Configuration}\";" + bat "powershell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command \"${environment};&.\\tools\\SetupTestEnvironment.ps1 SetupDumps;&.\\tools\\update_schema.ps1;&.\\tools\\UpdateIISExpressCertificate.ps1;&.\\run.cmd -CI default-build /p:SkipIISBackwardsCompatibilityTests=true /p:Configuration=${params.Configuration}\";" } } diff --git a/build/dependencies.props b/build/dependencies.props index 0c79d2d27c..00e1e18cdf 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -54,6 +54,18 @@ 2.3.1 2.4.0 - + + + 2.2.0-preview3-35458 + 2.2.0-preview3-35458 + + + 2.1.0 + 2.1.0 + 2.1.0 + 2.1.0 + 4.5.2 + 4.5.0 + diff --git a/build/functional-test-assets.targets b/build/functional-test-assets.targets new file mode 100644 index 0000000000..81fb82b4a3 --- /dev/null +++ b/build/functional-test-assets.targets @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/build/repo.props b/build/repo.props index a0d69a9923..83212e12d6 100644 --- a/build/repo.props +++ b/build/repo.props @@ -2,7 +2,6 @@ - Microsoft400 $(BuildDir)AspNetCoreModule.zip $(BuildDir)StressTestWebSite.zip @@ -13,6 +12,18 @@ + + + + + + + + + + + + Internal.AspNetCore.Universe.Lineup diff --git a/build/repo.targets b/build/repo.targets index 5b63ccb152..3e937d6bf9 100644 --- a/build/repo.targets +++ b/build/repo.targets @@ -35,22 +35,28 @@ + + $(BuildDir)Microsoft.AspNetCore.AspNetCoreModule.$(PackageVersion).nupkg + $(BuildDir)Microsoft.AspNetCore.AspNetCoreModuleV2.$(PackageVersion).nupkg + + - + NuGetPackage Microsoft.AspNetCore.AspNetCoreModule $(PackageVersion) $(RepositoryRoot) - + + - + NuGetPackage Microsoft.AspNetCore.AspNetCoreModuleV2 $(PackageVersion) $(RepositoryRoot) - + ZipArchive @@ -66,7 +72,7 @@ - + diff --git a/build/testsite.props b/build/testsite.props index 1ef6bf81cc..74f205b4cf 100644 --- a/build/testsite.props +++ b/build/testsite.props @@ -23,7 +23,6 @@ x64 -