diff --git a/.vsts-ci/linux.yml b/.vsts-ci/linux.yml index c77923ba1a..9f17b6be98 100644 --- a/.vsts-ci/linux.yml +++ b/.vsts-ci/linux.yml @@ -79,3 +79,11 @@ jobs: parameters: pool: Hosted Ubuntu 1604 dependsOn: linux_build + +- job: CodeCovTestPackage + displayName: CodeCoverage and Test Packages + steps: + - powershell: | + Import-Module .\tools\ci.psm1 + New-CodeCoverageAndTestPackage + displayName: CodeCoverage and Test Package diff --git a/.vsts-ci/mac.yml b/.vsts-ci/mac.yml index 56c4c6f27a..ade79f89df 100644 --- a/.vsts-ci/mac.yml +++ b/.vsts-ci/mac.yml @@ -73,3 +73,11 @@ jobs: parameters: pool: 'Hosted macOS' dependsOn: mac_build + +- job: CodeCovTestPackage + displayName: CodeCoverage and Test Packages + steps: + - powershell: | + Import-Module .\tools\ci.psm1 + New-CodeCoverageAndTestPackage + displayName: CodeCoverage and Test Package diff --git a/.vsts-ci/templates/windows-packaging.yml b/.vsts-ci/templates/windows-packaging.yml index 30f89fc5b8..3857426e44 100644 --- a/.vsts-ci/templates/windows-packaging.yml +++ b/.vsts-ci/templates/windows-packaging.yml @@ -27,6 +27,6 @@ jobs: - powershell: | Import-Module .\tools\ci.psm1 - Invoke-CIAfterTest + New-CodeCoverageAndTestPackage Invoke-CIFinish -NuGetKey $(NUGET_KEY) displayName: Build and Test Package diff --git a/build.psm1 b/build.psm1 index 478dcc5a48..4985b1ee08 100644 --- a/build.psm1 +++ b/build.psm1 @@ -638,19 +638,10 @@ function New-PSOptions { # Add .NET CLI tools to PATH Find-Dotnet - $ConfigWarningMsg = "The passed-in Configuration value '{0}' is not supported on '{1}'. Use '{2}' instead." if (-not $Configuration) { $Configuration = 'Debug' - } else { - switch ($Configuration) { - "CodeCoverage" { - if(-not $Environment.IsWindows) { - $Configuration = "Debug" - Write-Warning ($ConfigWarningMsg -f $switch.Current, $Environment.LinuxInfo.PRETTY_NAME, $Configuration) - } - } - } } + Write-Verbose "Using configuration '$Configuration'" $PowerShellDir = if (!$Environment.IsWindows) { diff --git a/tools/ci.psm1 b/tools/ci.psm1 index 5df1719228..e19c96c8a2 100644 --- a/tools/ci.psm1 +++ b/tools/ci.psm1 @@ -332,8 +332,7 @@ function Invoke-CITest Set-BuildVariable -Name TestPassed -Value True } -# Implement CI 'after_test' phase -function Invoke-CIAfterTest +function New-CodeCoverageAndTestPackage { [CmdletBinding()] param() @@ -745,9 +744,4 @@ function New-LinuxPackage $armPackage = Start-PSPackage @packageParams -Type tar-arm -SkipReleaseChecks Copy-Item $armPackage -Destination "${env:BUILD_ARTIFACTSTAGINGDIRECTORY}" -Force } - - if ($isFullBuild) - { - New-TestPackage -Destination "${env:SYSTEM_ARTIFACTSDIRECTORY}" - } }