From b4687adc7e47995a6b457ea82f850ad87a7c0eee Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Sat, 6 Oct 2018 16:38:59 +0100 Subject: [PATCH 01/18] try upgrade to 2.2preview2 of .net core --- PowerShell.Common.props | 2 +- build.psm1 | 8 ++++---- docs/building/linux.md | 2 +- docs/building/macos.md | 2 +- docs/building/windows-core.md | 4 ++-- global.json | 2 +- test/Test.Common.props | 2 +- test/tools/OpenCover/OpenCover.psm1 | 2 +- tools/packaging/packaging.psm1 | 6 +++--- tools/packaging/packaging.strings.psd1 | 2 +- .../microsoft_powershell_alpine3/build-and-run-pwsh.sh | 4 ++-- 11 files changed, 18 insertions(+), 18 deletions(-) diff --git a/PowerShell.Common.props b/PowerShell.Common.props index d25ddac462b..65f5ec37939 100644 --- a/PowerShell.Common.props +++ b/PowerShell.Common.props @@ -93,7 +93,7 @@ Microsoft Corporation (c) Microsoft Corporation. All rights reserved. - netcoreapp2.1 + netcoreapp2.2 2.1.5 Latest diff --git a/build.psm1 b/build.psm1 index aac038df249..952d5285b78 100644 --- a/build.psm1 +++ b/build.psm1 @@ -9,7 +9,7 @@ $script:TestModulePathSeparator = [System.IO.Path]::PathSeparator $script:TestModuleDirPath = Join-Path ([System.IO.Path]::GetTempPath()) 'PwshTestModules' $null = New-Item -Force -ItemType Directory -Path $script:TestModuleDirPath -$dotnetCLIChannel = "release" +$dotnetCLIChannel = 'preview' # TODO: Change this to 'release' once .Net Core 2.2 goes RTM $dotnetCLIRequiredVersion = $(Get-Content $PSScriptRoot/global.json | ConvertFrom-Json).Sdk.Version # Track if tags have been sync'ed @@ -380,7 +380,7 @@ Fix steps: Pop-Location } - # publish netcoreapp2.1 reference assemblies + # publish netcoreapp2.2 reference assemblies try { Push-Location "$PSScriptRoot/src/TypeCatalogGen" $refAssemblies = Get-Content -Path $incFileName | Where-Object { $_ -like "*microsoft.netcore.app*" } | ForEach-Object { $_.TrimEnd(';') } @@ -580,7 +580,7 @@ function New-PSOptions { [ValidateSet("Debug", "Release", "CodeCoverage", '')] [string]$Configuration, - [ValidateSet("netcoreapp2.1")] + [ValidateSet("netcoreapp2.2")] [string]$Framework, # These are duplicated from Start-PSBuild @@ -633,7 +633,7 @@ function New-PSOptions { Write-Verbose "Top project directory is $Top" if (-not $Framework) { - $Framework = "netcoreapp2.1" + $Framework = "netcoreapp2.2" Write-Verbose "Using framework '$Framework'" } diff --git a/docs/building/linux.md b/docs/building/linux.md index be37662a19f..32ff1c7e3ac 100644 --- a/docs/building/linux.md +++ b/docs/building/linux.md @@ -71,7 +71,7 @@ Start-PSBuild Congratulations! If everything went right, PowerShell is now built. The `Start-PSBuild` script will output the location of the executable: -`./src/powershell-unix/bin/Debug/netcoreapp2.1/linux-x64/publish/pwsh`. +`./src/powershell-unix/bin/Debug/netcoreapp2.2/linux-x64/publish/pwsh`. You should now be running the PowerShell Core that you just built, if your run the above executable. You can run our cross-platform Pester tests with `Start-PSPester`, and our xUnit tests with `Start-PSxUnit`. diff --git a/docs/building/macos.md b/docs/building/macos.md index 8f4e2594105..9df5ee95721 100644 --- a/docs/building/macos.md +++ b/docs/building/macos.md @@ -36,4 +36,4 @@ We cannot do this for you in the build module due to #[847][]. Start a PowerShell session by running `pwsh`, and then use `Start-PSBuild` from the module. -After building, PowerShell will be at `./src/powershell-unix/bin/Debug/netcoreapp2.1/osx-x64/publish/pwsh`. +After building, PowerShell will be at `./src/powershell-unix/bin/Debug/netcoreapp2.2/osx-x64/publish/pwsh`. diff --git a/docs/building/windows-core.md b/docs/building/windows-core.md index 92755f323db..81c049f5b46 100644 --- a/docs/building/windows-core.md +++ b/docs/building/windows-core.md @@ -58,11 +58,11 @@ Import-Module ./build.psm1 Start-PSBuild ``` -Congratulations! If everything went right, PowerShell is now built and executable as `./src/powershell-win-core/bin/Debug/netcoreapp2.1/win7-x64/publish/pwsh.exe`. +Congratulations! If everything went right, PowerShell is now built and executable as `./src/powershell-win-core/bin/Debug/netcoreapp2.2/win7-x64/publish/pwsh.exe`. This location is of the form `./[project]/bin/[configuration]/[framework]/[rid]/publish/[binary name]`, and our project is `powershell`, configuration is `Debug` by default, -framework is `netcoreapp2.1`, runtime identifier is `win7-x64` by default, +framework is `netcoreapp2.2`, runtime identifier is `win7-x64` by default, and binary name is `pwsh`. The function `Get-PSOutput` will return the path to the executable; thus you can execute the development copy via `& (Get-PSOutput)`. diff --git a/global.json b/global.json index 55e448dfe00..d6ef34167ac 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "sdk": { - "version": "2.1.403" + "version": "2.2.100-preview2" } } diff --git a/test/Test.Common.props b/test/Test.Common.props index 11b20a9fed7..8e24622a19f 100644 --- a/test/Test.Common.props +++ b/test/Test.Common.props @@ -4,7 +4,7 @@ Microsoft Corporation (c) Microsoft Corporation. All rights reserved. - netcoreapp2.1 + netcoreapp2.2 2.1.5 true diff --git a/test/tools/OpenCover/OpenCover.psm1 b/test/tools/OpenCover/OpenCover.psm1 index 78502650761..dbafa8b722a 100644 --- a/test/tools/OpenCover/OpenCover.psm1 +++ b/test/tools/OpenCover/OpenCover.psm1 @@ -624,7 +624,7 @@ function Invoke-OpenCover [parameter()]$OutputLog = "$home/Documents/OpenCover.xml", [parameter()]$TestPath = "${script:psRepoPath}/test/powershell", [parameter()]$OpenCoverPath = "$home/OpenCover", - [parameter()]$PowerShellExeDirectory = "${script:psRepoPath}/src/powershell-win-core/bin/CodeCoverage/netcoreapp2.1/win7-x64/publish", + [parameter()]$PowerShellExeDirectory = "${script:psRepoPath}/src/powershell-win-core/bin/CodeCoverage/netcoreapp2.2/win7-x64/publish", [parameter()]$PesterLogElevated = "$HOME/Documents/TestResultsElevated.xml", [parameter()]$PesterLogUnelevated = "$HOME/Documents/TestResultsUnelevated.xml", [parameter()]$PesterLogFormat = "NUnitXml", diff --git a/tools/packaging/packaging.psm1 b/tools/packaging/packaging.psm1 index dd15d2e6924..88d156ef97c 100644 --- a/tools/packaging/packaging.psm1 +++ b/tools/packaging/packaging.psm1 @@ -117,14 +117,14 @@ function Start-PSPackage { -not $Script:Options -or ## Start-PSBuild hasn't been executed yet -not $PSModuleRestoreCorrect -or ## Last build didn't specify '-PSModuleRestore' correctly $Script:Options.Configuration -ne $Configuration -or ## Last build was with configuration other than 'Release' - $Script:Options.Framework -ne "netcoreapp2.1" ## Last build wasn't for CoreCLR + $Script:Options.Framework -ne "netcoreapp2.2" ## Last build wasn't for CoreCLR } else { -not $Script:Options -or ## Start-PSBuild hasn't been executed yet -not $crossGenCorrect -or ## Last build didn't specify '-CrossGen' correctly -not $PSModuleRestoreCorrect -or ## Last build didn't specify '-PSModuleRestore' correctly $Script:Options.Runtime -ne $Runtime -or ## Last build wasn't for the required RID $Script:Options.Configuration -ne $Configuration -or ## Last build was with configuration other than 'Release' - $Script:Options.Framework -ne "netcoreapp2.1" ## Last build wasn't for CoreCLR + $Script:Options.Framework -ne "netcoreapp2.2" ## Last build wasn't for CoreCLR } # Make sure the most recent build satisfies the package requirement @@ -2432,7 +2432,7 @@ function New-MSIPatch # This example shows how to produce a Debug-x64 installer for development purposes. cd $RootPathOfPowerShellRepo Import-Module .\build.psm1; Import-Module .\tools\packaging\packaging.psm1 - New-MSIPackage -Verbose -ProductCode (New-Guid) -ProductSourcePath '.\src\powershell-win-core\bin\Debug\netcoreapp2.1\win7-x64\publish' -ProductTargetArchitecture x64 -ProductVersion '1.2.3' + New-MSIPackage -Verbose -ProductCode (New-Guid) -ProductSourcePath '.\src\powershell-win-core\bin\Debug\netcoreapp2.2\win7-x64\publish' -ProductTargetArchitecture x64 -ProductVersion '1.2.3' #> function New-MSIPackage { diff --git a/tools/packaging/packaging.strings.psd1 b/tools/packaging/packaging.strings.psd1 index 1e862b5885b..a562533cbdd 100644 --- a/tools/packaging/packaging.strings.psd1 +++ b/tools/packaging/packaging.strings.psd1 @@ -127,7 +127,7 @@ NuspecTemplate = @' - + diff --git a/tools/releaseBuild/Images/microsoft_powershell_alpine3/build-and-run-pwsh.sh b/tools/releaseBuild/Images/microsoft_powershell_alpine3/build-and-run-pwsh.sh index e7144c9c505..fabb5d721f0 100755 --- a/tools/releaseBuild/Images/microsoft_powershell_alpine3/build-and-run-pwsh.sh +++ b/tools/releaseBuild/Images/microsoft_powershell_alpine3/build-and-run-pwsh.sh @@ -94,10 +94,10 @@ cd ../powershell-unix dotnet publish --configuration Release --runtime linux-musl-x64 $dotnetArguments # add libpsl-native to build -mv libpsl-native.so bin/Release/netcoreapp2.1/linux-musl-x64/publish +mv libpsl-native.so bin/Release/netcoreapp2.2/linux-musl-x64/publish # tar build for output -cd bin/Release/netcoreapp2.1/linux-musl-x64/publish +cd bin/Release/netcoreapp2.2/linux-musl-x64/publish tar -czvf $tarName . From 56ba0a129c7c11893cccc19dca7a80c66772bb83 Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Sat, 6 Oct 2018 16:43:07 +0100 Subject: [PATCH 02/18] fix version number of sdk (needs to include build number) --- global.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global.json b/global.json index d6ef34167ac..f83fbed4ce7 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "sdk": { - "version": "2.2.100-preview2" + "version": "2.2.100-preview2-009404" } } From b961bc21dfaf800aade9571514f75aa2ed288950 Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Sat, 6 Oct 2018 19:54:21 +0100 Subject: [PATCH 03/18] [feature] set runtimeversion and revert changes made to alpine docker image creation process --- PowerShell.Common.props | 2 +- appveyor.yml | 2 +- test/Test.Common.props | 2 +- test/tools/WebListener/WebListener.csproj | 2 +- .../Images/microsoft_powershell_alpine3/build-and-run-pwsh.sh | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/PowerShell.Common.props b/PowerShell.Common.props index 65f5ec37939..2d083e20dca 100644 --- a/PowerShell.Common.props +++ b/PowerShell.Common.props @@ -94,7 +94,7 @@ (c) Microsoft Corporation. All rights reserved. netcoreapp2.2 - 2.1.5 + 2.2.0-preview2-26905-02 Latest true diff --git a/appveyor.yml b/appveyor.yml index 45bda6488b4..7a7618957f8 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -9,7 +9,7 @@ environment: - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 Purpose: ElevatedPesterTests_xUnit_Packaging -# cache version - netcoreapp.2.1-sdk.2.1.403 +# cache version - netcoreapp2.2.100-preview2-009404 cache: - '%HOMEDRIVE%%HOMEPATH%\.nuget\packages -> appveyor.yml' diff --git a/test/Test.Common.props b/test/Test.Common.props index 8e24622a19f..4bbdae89a21 100644 --- a/test/Test.Common.props +++ b/test/Test.Common.props @@ -5,7 +5,7 @@ (c) Microsoft Corporation. All rights reserved. netcoreapp2.2 - 2.1.5 + 2.2.0-preview2-26905-02 true true diff --git a/test/tools/WebListener/WebListener.csproj b/test/tools/WebListener/WebListener.csproj index a24e519ac4f..6ba331e7c22 100644 --- a/test/tools/WebListener/WebListener.csproj +++ b/test/tools/WebListener/WebListener.csproj @@ -7,7 +7,7 @@ - + diff --git a/tools/releaseBuild/Images/microsoft_powershell_alpine3/build-and-run-pwsh.sh b/tools/releaseBuild/Images/microsoft_powershell_alpine3/build-and-run-pwsh.sh index fabb5d721f0..e7144c9c505 100755 --- a/tools/releaseBuild/Images/microsoft_powershell_alpine3/build-and-run-pwsh.sh +++ b/tools/releaseBuild/Images/microsoft_powershell_alpine3/build-and-run-pwsh.sh @@ -94,10 +94,10 @@ cd ../powershell-unix dotnet publish --configuration Release --runtime linux-musl-x64 $dotnetArguments # add libpsl-native to build -mv libpsl-native.so bin/Release/netcoreapp2.2/linux-musl-x64/publish +mv libpsl-native.so bin/Release/netcoreapp2.1/linux-musl-x64/publish # tar build for output -cd bin/Release/netcoreapp2.2/linux-musl-x64/publish +cd bin/Release/netcoreapp2.1/linux-musl-x64/publish tar -czvf $tarName . From 04f8a7d7bee2869102cd66d6167535acfd6ba651 Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Sat, 6 Oct 2018 20:58:38 +0100 Subject: [PATCH 04/18] [feature] Fix NuGet package version of WebListener.csproj test project (build number does not match sdk) --- test/tools/WebListener/WebListener.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/tools/WebListener/WebListener.csproj b/test/tools/WebListener/WebListener.csproj index 6ba331e7c22..8d1731f18a6 100644 --- a/test/tools/WebListener/WebListener.csproj +++ b/test/tools/WebListener/WebListener.csproj @@ -7,7 +7,7 @@ - + From 35716298830cc4bc41cab6722fac8b941e582deb Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Sat, 6 Oct 2018 21:18:53 +0100 Subject: [PATCH 05/18] [feature] Fix WiX file components due to newer versions of DLLS --- assets/files.wxs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/assets/files.wxs b/assets/files.wxs index a7e70612a50..b3a795de852 100644 --- a/assets/files.wxs +++ b/assets/files.wxs @@ -2017,11 +2017,11 @@ - - + + - - + + @@ -2670,8 +2670,8 @@ - - + + From 0a61826f4f1c9f99463bac1f1ff8f380e246430f Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Sat, 6 Oct 2018 21:42:35 +0100 Subject: [PATCH 06/18] trigger ci From 97a67bea0b19cfb2cc01bb646c7910aacbedeff5 Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Sun, 7 Oct 2018 00:20:01 +0100 Subject: [PATCH 07/18] The dotnet-xunit test runner does not work with .Net Core 2.2 and due to problems, they have stopped supporting it, therefore use dotnet test as an alternative https://github.com/xunit/xunit/issues/1675 https://xunit.github.io/releases/2.4 --- build.psm1 | 30 ++++++++++++++++-------------- test/csharp/csharp.tests.csproj | 2 -- test/hosting/hosting.tests.csproj | 2 -- tools/appveyor.psm1 | 14 +++++++------- tools/travis.ps1 | 8 ++++---- 5 files changed, 27 insertions(+), 29 deletions(-) diff --git a/build.psm1 b/build.psm1 index 952d5285b78..03a938d7e9c 100644 --- a/build.psm1 +++ b/build.psm1 @@ -1357,8 +1357,8 @@ function Test-PSPesterResults function Start-PSxUnit { [CmdletBinding()]param( - [string] $SequentialTestResultsFile = "SequentialXUnitResults.xml", - [string] $ParallelTestResultsFile = "ParallelXUnitResults.xml" + [string] $SequentialTestResultsFolder = "SequentialXUnitResults", + [string] $ParallelTestResultsFolder = "ParallelXUnitResults" ) # Add .NET CLI tools to PATH @@ -1369,13 +1369,6 @@ function Start-PSxUnit { throw "PowerShell must be built before running tests!" } - if (Test-Path $SequentialTestResultsFile) { - Remove-Item $SequentialTestResultsFile -Force -ErrorAction SilentlyContinue - } - if (Test-Path $ParallelTestResultsFile) { - Remove-Item $ParallelTestResultsFile -Force -ErrorAction SilentlyContinue - } - try { Push-Location $PSScriptRoot/test/csharp @@ -1412,10 +1405,14 @@ function Start-PSxUnit { } } + if (Test-Path (Join-Path $pwd $SequentialTestResultsFolder)) { + Remove-Item $SequentialTestResultsFolder -Force -Recurse -ErrorAction SilentlyContinue + } # Run sequential tests first, and then run the tests that can execute in parallel - dotnet xunit -configuration $Options.configuration -xml $SequentialTestResultsFile -namespace "PSTests.Sequential" -parallel none - - Publish-TestResults -Path $SequentialTestResultsFile -Type 'XUnit' -Title 'Xunit Sequential' + $sequentialResultDirectory = Join-Path $pwd $SequentialTestResultsFolder + dotnet test --configuration $Options.configuration --filter FullyQualifiedName~PSTests.Sequential --logger:trx -p:ParallelizeTestCollections=false --results-directory $sequentialResultDirectory + $sequentialTestResultsFile = Get-ChildItem $sequentialResultDirectory + Publish-TestResults -Path $sequentialTestResultsFile.FullName -Type 'NUnit' -Title 'Xunit Sequential' $extraParams = @() @@ -1430,8 +1427,13 @@ function Start-PSxUnit { ) } - dotnet xunit -configuration $Options.configuration -xml $ParallelTestResultsFile -namespace "PSTests.Parallel" -nobuild @extraParams - Publish-TestResults -Path $ParallelTestResultsFile -Type 'XUnit' -Title 'Xunit Parallel' + if (Test-Path (Join-Path $pwd $ParallelTestResultsFolder)) { + Remove-Item $ParallelTestResultsFolder -Force -Recurse -ErrorAction SilentlyContinue + } + $parallelResultDirectory = Join-Path $pwd $ParallelTestResultsFolder + dotnet test --configuration $Options.configuration --filter FullyQualifiedName~PSTests.Parallel --logger:trx --no-build --results-directory $parallelResultDirectory + $parallelTestResultsFile = Get-ChildItem $parallelResultDirectory + Publish-TestResults -Path $parallelTestResultsFile.FullName -Type 'NUnit' -Title 'Xunit Parallel' } finally { Pop-Location diff --git a/test/csharp/csharp.tests.csproj b/test/csharp/csharp.tests.csproj index ba31c86b5fd..c3d6d999049 100644 --- a/test/csharp/csharp.tests.csproj +++ b/test/csharp/csharp.tests.csproj @@ -24,8 +24,6 @@ - - diff --git a/test/hosting/hosting.tests.csproj b/test/hosting/hosting.tests.csproj index 82c6b8f298c..c021c1a6cbd 100644 --- a/test/hosting/hosting.tests.csproj +++ b/test/hosting/hosting.tests.csproj @@ -17,8 +17,6 @@ - - diff --git a/tools/appveyor.psm1 b/tools/appveyor.psm1 index b70cb093cd5..8190658bc84 100644 --- a/tools/appveyor.psm1 +++ b/tools/appveyor.psm1 @@ -337,8 +337,8 @@ function Invoke-AppVeyorTest Write-Host -Foreground Green 'Run CoreCLR tests' $testResultsNonAdminFile = "$pwd\TestsResultsNonAdmin.xml" $testResultsAdminFile = "$pwd\TestsResultsAdmin.xml" - $SequentialXUnitTestResultsFile = "$pwd\SequentialXUnitTestResults.xml" - $ParallelXUnitTestResultsFile = "$pwd\ParallelXUnitTestResults.xml" + $SequentialXUnitTestResultsFolder = "$pwd\SequentialXUnitTestResults" + $ParallelXUnitTestResultsFolder = "$pwd\ParallelXUnitTestResults" if(!(Test-Path "$env:CoreOutput\pwsh.exe")) { throw "CoreCLR pwsh.exe was not built" @@ -411,16 +411,16 @@ function Invoke-AppVeyorTest Write-Host -Foreground Green 'Upload CoreCLR Admin test results' Update-AppVeyorTestResults -resultsFile $testResultsAdminFile - Start-PSxUnit -SequentialTestResultsFile $SequentialXUnitTestResultsFile -ParallelTestResultsFile $ParallelXUnitTestResultsFile + Start-PSxUnit -SequentialTestResultsFolder $SequentialXUnitTestResultsFolder -ParallelTestResultsFile $ParallelXUnitTestResultsFolder Write-Host -ForegroundColor Green 'Uploading PSxUnit test results' - Update-AppVeyorTestResults -resultsFile $SequentialXUnitTestResultsFile - Update-AppVeyorTestResults -resultsFile $ParallelXUnitTestResultsFile + Update-AppVeyorTestResults -resultsFile $SequentialXUnitTestResultsFolder + Update-AppVeyorTestResults -resultsFile $ParallelXUnitTestResultsFolder # Fail the build, if tests failed Test-PSPesterResults -TestResultsFile $testResultsAdminFile @( - $SequentialXUnitTestResultsFile, - $ParallelXUnitTestResultsFile + $SequentialXUnitTestResultsFolder, + $ParallelXUnitTestResultsFolder ) | ForEach-Object { Test-XUnitTestResults -TestResultsFile $_ } diff --git a/tools/travis.ps1 b/tools/travis.ps1 index 791ca4560cb..415937fd552 100644 --- a/tools/travis.ps1 +++ b/tools/travis.ps1 @@ -330,12 +330,12 @@ elseif($Stage -eq 'Build') } try { - $SequentialXUnitTestResultsFile = "$pwd/SequentialXUnitTestResults.xml" - $ParallelXUnitTestResultsFile = "$pwd/ParallelXUnitTestResults.xml" + $SequentialXUnitTestResultsFolder = "$pwd/SequentialXUnitTestResults" + $ParallelXUnitTestResultsFolder = "$pwd/ParallelXUnitTestResults" - Start-PSxUnit -SequentialTestResultsFile $SequentialXUnitTestResultsFile -ParallelTestResultsFile $ParallelXUnitTestResultsFile + Start-PSxUnit -SequentialTestResultsFolder $SequentialXUnitTestResultsFolder -ParallelTestResultsFile $ParallelXUnitTestResultsFolder # If there are failures, Test-XUnitTestResults throws - $SequentialXUnitTestResultsFile, $ParallelXUnitTestResultsFile | ForEach-Object { Test-XUnitTestResults -TestResultsFile $_ } + $SequentialXUnitTestResultsFolder, $ParallelXUnitTestResultsFolder | ForEach-Object { Test-XUnitTestResults -TestResultsFolder $_ } } catch { $result = "FAIL" From 9c48a7af43b62e242025b94e97ac46046507a5d9 Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Sun, 7 Oct 2018 00:31:55 +0100 Subject: [PATCH 08/18] I forgot that trx format ix VsTest, not NUnit --- build.psm1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build.psm1 b/build.psm1 index 03a938d7e9c..bd7ad6ead43 100644 --- a/build.psm1 +++ b/build.psm1 @@ -1172,7 +1172,7 @@ function Publish-TestResults [string] $Path, - [ValidateSet('NUnit','XUnit')] + [ValidateSet('NUnit','VsTest')] [string] $Type='NUnit' ) @@ -1412,7 +1412,7 @@ function Start-PSxUnit { $sequentialResultDirectory = Join-Path $pwd $SequentialTestResultsFolder dotnet test --configuration $Options.configuration --filter FullyQualifiedName~PSTests.Sequential --logger:trx -p:ParallelizeTestCollections=false --results-directory $sequentialResultDirectory $sequentialTestResultsFile = Get-ChildItem $sequentialResultDirectory - Publish-TestResults -Path $sequentialTestResultsFile.FullName -Type 'NUnit' -Title 'Xunit Sequential' + Publish-TestResults -Path $sequentialTestResultsFile.FullName -Type 'VsTest' -Title 'Xunit Sequential' $extraParams = @() @@ -1433,7 +1433,7 @@ function Start-PSxUnit { $parallelResultDirectory = Join-Path $pwd $ParallelTestResultsFolder dotnet test --configuration $Options.configuration --filter FullyQualifiedName~PSTests.Parallel --logger:trx --no-build --results-directory $parallelResultDirectory $parallelTestResultsFile = Get-ChildItem $parallelResultDirectory - Publish-TestResults -Path $parallelTestResultsFile.FullName -Type 'NUnit' -Title 'Xunit Parallel' + Publish-TestResults -Path $parallelTestResultsFile.FullName -Type 'VsTest' -Title 'Xunit Parallel' } finally { Pop-Location From 91d1c8287013a701662983e1966bdb46480f657b Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Sun, 7 Oct 2018 00:33:10 +0100 Subject: [PATCH 09/18] [feature] From 17fab9b53a0f5d200f8e77935ef1a2698be0ab68 Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Sun, 7 Oct 2018 01:00:10 +0100 Subject: [PATCH 10/18] [feature] Fix parameter name due to rename --- tools/appveyor.psm1 | 2 +- tools/travis.ps1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/appveyor.psm1 b/tools/appveyor.psm1 index 8190658bc84..13ad8e6c9ec 100644 --- a/tools/appveyor.psm1 +++ b/tools/appveyor.psm1 @@ -411,7 +411,7 @@ function Invoke-AppVeyorTest Write-Host -Foreground Green 'Upload CoreCLR Admin test results' Update-AppVeyorTestResults -resultsFile $testResultsAdminFile - Start-PSxUnit -SequentialTestResultsFolder $SequentialXUnitTestResultsFolder -ParallelTestResultsFile $ParallelXUnitTestResultsFolder + Start-PSxUnit -SequentialTestResultsFolder $SequentialXUnitTestResultsFolder -ParallelTestResultsFolder $ParallelXUnitTestResultsFolder Write-Host -ForegroundColor Green 'Uploading PSxUnit test results' Update-AppVeyorTestResults -resultsFile $SequentialXUnitTestResultsFolder Update-AppVeyorTestResults -resultsFile $ParallelXUnitTestResultsFolder diff --git a/tools/travis.ps1 b/tools/travis.ps1 index 415937fd552..97023515f85 100644 --- a/tools/travis.ps1 +++ b/tools/travis.ps1 @@ -333,7 +333,7 @@ elseif($Stage -eq 'Build') $SequentialXUnitTestResultsFolder = "$pwd/SequentialXUnitTestResults" $ParallelXUnitTestResultsFolder = "$pwd/ParallelXUnitTestResults" - Start-PSxUnit -SequentialTestResultsFolder $SequentialXUnitTestResultsFolder -ParallelTestResultsFile $ParallelXUnitTestResultsFolder + Start-PSxUnit -SequentialTestResultsFolder $SequentialXUnitTestResultsFolder -ParallelTestResultsFolder $ParallelXUnitTestResultsFolder # If there are failures, Test-XUnitTestResults throws $SequentialXUnitTestResultsFolder, $ParallelXUnitTestResultsFolder | ForEach-Object { Test-XUnitTestResults -TestResultsFolder $_ } } From 5750e86d272d8f63c376a6ac6637bf5913e81fd4 Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Sun, 7 Oct 2018 10:07:33 +0100 Subject: [PATCH 11/18] [feature] revert to use xml test logger again --- build.psm1 | 28 ++++++++++++---------------- test/csharp/csharp.tests.csproj | 3 ++- test/hosting/hosting.tests.csproj | 4 ++-- 3 files changed, 16 insertions(+), 19 deletions(-) diff --git a/build.psm1 b/build.psm1 index bd7ad6ead43..9dca1546f93 100644 --- a/build.psm1 +++ b/build.psm1 @@ -1172,7 +1172,7 @@ function Publish-TestResults [string] $Path, - [ValidateSet('NUnit','VsTest')] + [ValidateSet('NUnit','XUnit')] [string] $Type='NUnit' ) @@ -1357,8 +1357,8 @@ function Test-PSPesterResults function Start-PSxUnit { [CmdletBinding()]param( - [string] $SequentialTestResultsFolder = "SequentialXUnitResults", - [string] $ParallelTestResultsFolder = "ParallelXUnitResults" + [string] $SequentialTestResultsFile = "SequentialXUnitResults.xml", + [string] $ParallelTestResultsFile = "ParallelXUnitResults.xml" ) # Add .NET CLI tools to PATH @@ -1405,14 +1405,12 @@ function Start-PSxUnit { } } - if (Test-Path (Join-Path $pwd $SequentialTestResultsFolder)) { - Remove-Item $SequentialTestResultsFolder -Force -Recurse -ErrorAction SilentlyContinue - } # Run sequential tests first, and then run the tests that can execute in parallel - $sequentialResultDirectory = Join-Path $pwd $SequentialTestResultsFolder - dotnet test --configuration $Options.configuration --filter FullyQualifiedName~PSTests.Sequential --logger:trx -p:ParallelizeTestCollections=false --results-directory $sequentialResultDirectory - $sequentialTestResultsFile = Get-ChildItem $sequentialResultDirectory - Publish-TestResults -Path $sequentialTestResultsFile.FullName -Type 'VsTest' -Title 'Xunit Sequential' + if (Test-Path $SequentialTestResultsFile) { + Remove-Item $SequentialTestResultsFile -Force -ErrorAction SilentlyContinue + } + dotnet test --configuration $Options.configuration --filter FullyQualifiedName~PSTests.Sequential -p:ParallelizeTestCollections=false --test-adapter-path:. "--logger:xunit;LogFilePath=$SequentialTestResultsFile" + Publish-TestResults -Path $sequentialTestResultsFile -Type 'XUnit' -Title 'Xunit Sequential' $extraParams = @() @@ -1427,13 +1425,11 @@ function Start-PSxUnit { ) } - if (Test-Path (Join-Path $pwd $ParallelTestResultsFolder)) { - Remove-Item $ParallelTestResultsFolder -Force -Recurse -ErrorAction SilentlyContinue + if (Test-Path $ParallelTestResultsFile) { + Remove-Item $ParallelTestResultsFile -Force -ErrorAction SilentlyContinue } - $parallelResultDirectory = Join-Path $pwd $ParallelTestResultsFolder - dotnet test --configuration $Options.configuration --filter FullyQualifiedName~PSTests.Parallel --logger:trx --no-build --results-directory $parallelResultDirectory - $parallelTestResultsFile = Get-ChildItem $parallelResultDirectory - Publish-TestResults -Path $parallelTestResultsFile.FullName -Type 'VsTest' -Title 'Xunit Parallel' + dotnet test --configuration $Options.configuration --filter FullyQualifiedName~PSTests.Parallel --no-build --test-adapter-path:. "--logger:xunit;LogFilePath=$ParallelTestResultsFile" + Publish-TestResults -Path $parallelTestResultsFile -Type 'XUnit' -Title 'Xunit Parallel' } finally { Pop-Location diff --git a/test/csharp/csharp.tests.csproj b/test/csharp/csharp.tests.csproj index c3d6d999049..c4326b26b77 100644 --- a/test/csharp/csharp.tests.csproj +++ b/test/csharp/csharp.tests.csproj @@ -22,8 +22,9 @@ - + + diff --git a/test/hosting/hosting.tests.csproj b/test/hosting/hosting.tests.csproj index c021c1a6cbd..ca4ec43d2d7 100644 --- a/test/hosting/hosting.tests.csproj +++ b/test/hosting/hosting.tests.csproj @@ -16,9 +16,9 @@ - - + + From b75514aa44ff71d5fba7501d21f61c467193dbfe Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Sun, 7 Oct 2018 10:12:48 +0100 Subject: [PATCH 12/18] [feature] forgot some folder->file reverts --- tools/appveyor.psm1 | 14 +++++++------- tools/travis.ps1 | 8 ++++---- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/tools/appveyor.psm1 b/tools/appveyor.psm1 index 13ad8e6c9ec..b70cb093cd5 100644 --- a/tools/appveyor.psm1 +++ b/tools/appveyor.psm1 @@ -337,8 +337,8 @@ function Invoke-AppVeyorTest Write-Host -Foreground Green 'Run CoreCLR tests' $testResultsNonAdminFile = "$pwd\TestsResultsNonAdmin.xml" $testResultsAdminFile = "$pwd\TestsResultsAdmin.xml" - $SequentialXUnitTestResultsFolder = "$pwd\SequentialXUnitTestResults" - $ParallelXUnitTestResultsFolder = "$pwd\ParallelXUnitTestResults" + $SequentialXUnitTestResultsFile = "$pwd\SequentialXUnitTestResults.xml" + $ParallelXUnitTestResultsFile = "$pwd\ParallelXUnitTestResults.xml" if(!(Test-Path "$env:CoreOutput\pwsh.exe")) { throw "CoreCLR pwsh.exe was not built" @@ -411,16 +411,16 @@ function Invoke-AppVeyorTest Write-Host -Foreground Green 'Upload CoreCLR Admin test results' Update-AppVeyorTestResults -resultsFile $testResultsAdminFile - Start-PSxUnit -SequentialTestResultsFolder $SequentialXUnitTestResultsFolder -ParallelTestResultsFolder $ParallelXUnitTestResultsFolder + Start-PSxUnit -SequentialTestResultsFile $SequentialXUnitTestResultsFile -ParallelTestResultsFile $ParallelXUnitTestResultsFile Write-Host -ForegroundColor Green 'Uploading PSxUnit test results' - Update-AppVeyorTestResults -resultsFile $SequentialXUnitTestResultsFolder - Update-AppVeyorTestResults -resultsFile $ParallelXUnitTestResultsFolder + Update-AppVeyorTestResults -resultsFile $SequentialXUnitTestResultsFile + Update-AppVeyorTestResults -resultsFile $ParallelXUnitTestResultsFile # Fail the build, if tests failed Test-PSPesterResults -TestResultsFile $testResultsAdminFile @( - $SequentialXUnitTestResultsFolder, - $ParallelXUnitTestResultsFolder + $SequentialXUnitTestResultsFile, + $ParallelXUnitTestResultsFile ) | ForEach-Object { Test-XUnitTestResults -TestResultsFile $_ } diff --git a/tools/travis.ps1 b/tools/travis.ps1 index 97023515f85..791ca4560cb 100644 --- a/tools/travis.ps1 +++ b/tools/travis.ps1 @@ -330,12 +330,12 @@ elseif($Stage -eq 'Build') } try { - $SequentialXUnitTestResultsFolder = "$pwd/SequentialXUnitTestResults" - $ParallelXUnitTestResultsFolder = "$pwd/ParallelXUnitTestResults" + $SequentialXUnitTestResultsFile = "$pwd/SequentialXUnitTestResults.xml" + $ParallelXUnitTestResultsFile = "$pwd/ParallelXUnitTestResults.xml" - Start-PSxUnit -SequentialTestResultsFolder $SequentialXUnitTestResultsFolder -ParallelTestResultsFolder $ParallelXUnitTestResultsFolder + Start-PSxUnit -SequentialTestResultsFile $SequentialXUnitTestResultsFile -ParallelTestResultsFile $ParallelXUnitTestResultsFile # If there are failures, Test-XUnitTestResults throws - $SequentialXUnitTestResultsFolder, $ParallelXUnitTestResultsFolder | ForEach-Object { Test-XUnitTestResults -TestResultsFolder $_ } + $SequentialXUnitTestResultsFile, $ParallelXUnitTestResultsFile | ForEach-Object { Test-XUnitTestResults -TestResultsFile $_ } } catch { $result = "FAIL" From e0924411cf6fff2f44aabe9fb91f1e12d960350c Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Sun, 7 Oct 2018 10:55:10 +0100 Subject: [PATCH 13/18] [feature] Update Markdig.Signed NuGet package to 0.15.4 due to new release 2h ago --- .../Microsoft.PowerShell.MarkdownRender.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.PowerShell.MarkdownRender/Microsoft.PowerShell.MarkdownRender.csproj b/src/Microsoft.PowerShell.MarkdownRender/Microsoft.PowerShell.MarkdownRender.csproj index 975e7757823..1481ead2b16 100644 --- a/src/Microsoft.PowerShell.MarkdownRender/Microsoft.PowerShell.MarkdownRender.csproj +++ b/src/Microsoft.PowerShell.MarkdownRender/Microsoft.PowerShell.MarkdownRender.csproj @@ -9,7 +9,7 @@ - + From 699afb8ac5059fa99b3e10d33b837c008b06e3d9 Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Sun, 7 Oct 2018 12:07:05 +0100 Subject: [PATCH 14/18] [feature] retrigger CI due to sporadic failure From 7de084d33bd0757d280cd6a2762e9d6876c1895f Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Wed, 10 Oct 2018 22:17:48 +0100 Subject: [PATCH 15/18] fix merge conflict error to have no diff again in the upstreamed xunit code --- build.psm1 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build.psm1 b/build.psm1 index b4776579ccc..5aab20bbc70 100644 --- a/build.psm1 +++ b/build.psm1 @@ -1410,6 +1410,8 @@ function Start-PSxUnit { Remove-Item $SequentialTestResultsFile -Force -ErrorAction SilentlyContinue } dotnet test --configuration $Options.configuration --filter FullyQualifiedName~PSTests.Sequential -p:ParallelizeTestCollections=false --test-adapter-path:. "--logger:xunit;LogFilePath=$SequentialTestResultsFile" + Publish-TestResults -Path $SequentialTestResultsFile -Type 'XUnit' -Title 'Xunit Sequential' + $extraParams = @() # we are having intermittent issues on macOS with these tests failing. From fda3fb9a21ee440f013474580aca785b1e07cc75 Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Mon, 22 Oct 2018 21:27:47 +0100 Subject: [PATCH 16/18] Update to .Net Core 2.2-preview3 --- PowerShell.Common.props | 2 +- global.json | 2 +- test/tools/WebListener/WebListener.csproj | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/PowerShell.Common.props b/PowerShell.Common.props index 2d083e20dca..79a33e915a1 100644 --- a/PowerShell.Common.props +++ b/PowerShell.Common.props @@ -94,7 +94,7 @@ (c) Microsoft Corporation. All rights reserved. netcoreapp2.2 - 2.2.0-preview2-26905-02 + 2.2.0-preview3-27014-02 Latest true diff --git a/global.json b/global.json index f83fbed4ce7..b082538e039 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "sdk": { - "version": "2.2.100-preview2-009404" + "version": "2.2.100-preview3-009430" } } diff --git a/test/tools/WebListener/WebListener.csproj b/test/tools/WebListener/WebListener.csproj index 8d1731f18a6..4fc854c36a0 100644 --- a/test/tools/WebListener/WebListener.csproj +++ b/test/tools/WebListener/WebListener.csproj @@ -7,7 +7,7 @@ - + From 8a13d7cb3a47de98b3a48e55e4164a2bfba8164c Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Mon, 22 Oct 2018 21:29:00 +0100 Subject: [PATCH 17/18] [feature] udpate test project version and appveyor cache --- appveyor.yml | 2 +- test/Test.Common.props | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 7a7618957f8..74cc5bada1f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -9,7 +9,7 @@ environment: - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 Purpose: ElevatedPesterTests_xUnit_Packaging -# cache version - netcoreapp2.2.100-preview2-009404 +# cache version - netcoreapp2.2.100-preview3-009430 cache: - '%HOMEDRIVE%%HOMEPATH%\.nuget\packages -> appveyor.yml' diff --git a/test/Test.Common.props b/test/Test.Common.props index 4bbdae89a21..d4a9fcad66a 100644 --- a/test/Test.Common.props +++ b/test/Test.Common.props @@ -5,7 +5,7 @@ (c) Microsoft Corporation. All rights reserved. netcoreapp2.2 - 2.2.0-preview2-26905-02 + 2.2.0-preview3-27014-02 true true From 52de7b779ec7df84c84de3ba755fd0c4278b1bee Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Mon, 22 Oct 2018 22:39:31 +0100 Subject: [PATCH 18/18] [feature] Fix MSI installer by updating to the new version of mscordaccore and sos due to the upgrade from preview2 to preview3 --- assets/files.wxs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/files.wxs b/assets/files.wxs index f29ed29b183..31807510065 100644 --- a/assets/files.wxs +++ b/assets/files.wxs @@ -2018,10 +2018,10 @@ - + - +