mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Make test file result names unique (#8979)
Make test file result names unique - Also, remove dead code that I found during investigation Fixes #8978 ## PR Context Making the filenames unique, ensures that we can download the results from the artifacts and do our own processing of the results.
This commit is contained in:
+2
-27
@@ -262,20 +262,6 @@ function Invoke-CIInstall
|
||||
Start-PSBootstrap -Confirm:$false
|
||||
}
|
||||
|
||||
# A wrapper to ensure that we upload test results
|
||||
# and that if we are not able to that it does not fail
|
||||
# the CI build
|
||||
function Update-TestResults
|
||||
{
|
||||
param(
|
||||
[string] $resultsFile
|
||||
)
|
||||
if(!$pushedResults)
|
||||
{
|
||||
Write-Warning "Failed to push all artifacts for $resultsFile"
|
||||
}
|
||||
}
|
||||
|
||||
function Invoke-CIxUnit
|
||||
{
|
||||
param(
|
||||
@@ -291,8 +277,6 @@ function Invoke-CIxUnit
|
||||
$xUnitTestResultsFile = "$pwd\xUnitTestResults.xml"
|
||||
|
||||
Start-PSxUnit -xUnitTestResultsFile $xUnitTestResultsFile
|
||||
Write-Host -ForegroundColor Green 'Uploading PSxUnit test results'
|
||||
Update-TestResults -resultsFile $xUnitTestResultsFile
|
||||
Push-Artifact -Path $xUnitTestResultsFile -name xunit
|
||||
|
||||
if(!$SkipFailing.IsPresent)
|
||||
@@ -316,8 +300,8 @@ function Invoke-CITest
|
||||
|
||||
$env:CoreOutput = Split-Path -Parent (Get-PSOutput -Options (Get-PSOptions))
|
||||
Write-Host -Foreground Green 'Run CoreCLR tests'
|
||||
$testResultsNonAdminFile = "$pwd\TestsResultsNonAdmin.xml"
|
||||
$testResultsAdminFile = "$pwd\TestsResultsAdmin.xml"
|
||||
$testResultsNonAdminFile = "$pwd\TestsResultsNonAdmin-$TagSet.xml"
|
||||
$testResultsAdminFile = "$pwd\TestsResultsAdmin-$TagSet.xml"
|
||||
if(!(Test-Path "$env:CoreOutput\pwsh.exe"))
|
||||
{
|
||||
throw "CoreCLR pwsh.exe was not built"
|
||||
@@ -353,8 +337,6 @@ function Invoke-CITest
|
||||
ExcludeTag = $ExcludeTag + 'RequireAdminOnWindows'
|
||||
}
|
||||
Start-PSPester @arguments -Title "Pester Unelevated - $TagSet"
|
||||
Write-Host -Foreground Green 'Upload CoreCLR Non-Admin test results'
|
||||
Update-TestResults -resultsFile $testResultsNonAdminFile
|
||||
# Fail the build, if tests failed
|
||||
Test-PSPesterResults -TestResultsFile $testResultsNonAdminFile
|
||||
|
||||
@@ -377,8 +359,6 @@ function Invoke-CITest
|
||||
}
|
||||
Start-PSPester @arguments -Title "Pester Experimental Unelevated - $featureName"
|
||||
|
||||
Write-Host -ForegroundColor Green "Upload CoreCLR Non-Admin test results for experimental feature '$featureName'"
|
||||
Update-TestResults -resultsFile $expFeatureTestResultFile
|
||||
# Fail the build, if tests failed
|
||||
Test-PSPesterResults -TestResultsFile $expFeatureTestResultFile
|
||||
}
|
||||
@@ -393,9 +373,6 @@ function Invoke-CITest
|
||||
ExcludeTag = $ExcludeTag
|
||||
}
|
||||
Start-PSPester @arguments -Title "Pester Elevated - $TagSet"
|
||||
Write-Host -Foreground Green 'Upload CoreCLR Admin test results'
|
||||
Update-TestResults -resultsFile $testResultsAdminFile
|
||||
|
||||
|
||||
# Fail the build, if tests failed
|
||||
Test-PSPesterResults -TestResultsFile $testResultsAdminFile
|
||||
@@ -422,8 +399,6 @@ function Invoke-CITest
|
||||
}
|
||||
Start-PSPester @arguments -Title "Pester Experimental Elevated - $featureName"
|
||||
|
||||
Write-Host -ForegroundColor Green "Upload CoreCLR Admin test results for experimental feature '$featureName'"
|
||||
Update-TestResults -resultsFile $expFeatureTestResultFile
|
||||
# Fail the build, if tests failed
|
||||
Test-PSPesterResults -TestResultsFile $expFeatureTestResultFile
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user