@@ -51,19 +51,21 @@ $webClient = New-Object System.Net.WebClient
5151
5252foreach ($testRun in $testRuns.value )
5353{
54+ Write-Host " testRunUri = $testRun .url"
5455 $testResults = Invoke-RestMethod - Uri " $ ( $testRun.url ) /results?api-version=5.0" - Method Get - Headers $azureDevOpsRestApiHeaders
5556 $isTestRunNameShown = $false
5657
5758 foreach ($testResult in $testResults.value )
5859 {
59- if (" comment" -in $testResult )
60- {
60+
6161 $info = ConvertFrom-Json $testResult.comment
6262 $helixJobId = $info.HelixJobId
6363 $helixWorkItemName = $info.HelixWorkItemName
6464
6565 $workItem = " $helixJobId -$helixWorkItemName "
6666
67+ Write-Host " Helix Work Item = $workItem "
68+
6769 if (-not $workItems.Contains ($workItem ))
6870 {
6971 $workItems.Add ($workItem )
@@ -89,9 +91,9 @@ foreach ($testRun in $testRuns.value)
8991
9092 foreach ($pgcFile in $pgcFiles )
9193 {
92- $flavorPath = $pgcFile .Name .Split (' .' )[0 ]
93- $archPath = $pgcFile .Name .Split (' .' )[1 ]
94- $fileName = $pgcFile.Name.Remove ( 0 , $flavorPath .length + $archPath .length + 2 )
94+ $flavorPath = $testResult .automatedTestName .Split (' .' )[0 ]
95+ $archPath = $testResult .automatedTestName .Split (' .' )[1 ]
96+ $fileName = $pgcFile.Name
9597 $fullPath = " $OutputFolder \PGO\$flavorPath \$archPath "
9698 $destination = " $fullPath \$fileName "
9799
@@ -107,6 +109,6 @@ foreach ($testRun in $testRuns.value)
107109 }
108110 }
109111 }
110- }
112+
111113 }
112114}
0 commit comments