File tree Expand file tree Collapse file tree 3 files changed +19
-11
lines changed Expand file tree Collapse file tree 3 files changed +19
-11
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,13 @@ steps:
31
31
packageType : sdk
32
32
version : 3.1.x
33
33
34
+ - task : PowerShell@2
35
+ displayName : Remove pre-installed Az modules
36
+ inputs :
37
+ pwsh : true
38
+ targetType : filePath
39
+ filePath : ./tools/TestFx/Utilities/CommonUtility.ps1
40
+
34
41
- task : DotNetCoreCLI@2
35
42
displayName : Test
36
43
inputs :
@@ -54,13 +61,12 @@ steps:
54
61
55
62
- pwsh : |
56
63
Install-Module -Name Pester -RequiredVersion 4.10.1 -Force
57
- Import-Module (Join-Path -Path . -ChildPath Az.Accounts | Join-Path -ChildPath Az.Accounts.psd1) -Force
58
64
if ($IsWindows) { $sp = ";" } else { $sp = ":" }
59
65
$env:PSModulePath = $env:PSModulePath + $sp + (pwd).Path
60
66
$rootFolder = (Get-item $PWD).Parent.Parent
61
67
Get-ChildItem -File -Recurse test-module.ps1 | ForEach-Object {
62
68
Write-Host $_.Directory.FullName
63
- cd $rootFolder;
69
+ cd $rootFolder
64
70
.\tools\ExecuteCIStep.ps1 -TestAutorest -AutorestDirectory $_.Directory.FullName
65
71
}
66
72
workingDirectory : ' artifacts/Debug'
Original file line number Diff line number Diff line change @@ -191,11 +191,13 @@ foreach ($moduleName in $allModules) {
191
191
$cvgBaseline | Export-Csv - Path $cvgBaselineCsv - Encoding utf8 - NoTypeInformation - Append - Force
192
192
}
193
193
194
- Write-Host " ##[section]`" $moduleName `" total commands # : $totalCommandsCount " - ForegroundColor Green
195
- Write-Host " ##[section]`" $moduleName `" tested commands # : $totalTestedCommandsCount " - ForegroundColor Green
196
- Write-Host " ##[section]`" $moduleName `" test coverage % : $cvgCommand " - ForegroundColor Green
194
+ if ($CalcBaseline.IsPresent ) {
195
+ Write-Host " ##[section]`" $moduleName `" total commands # : $totalCommandsCount " - ForegroundColor Green
196
+ Write-Host " ##[section]`" $moduleName `" tested commands # : $totalTestedCommandsCount " - ForegroundColor Green
197
+ Write-Host " ##[section]`" $moduleName `" test coverage % : $cvgCommand " - ForegroundColor Green
197
198
198
- Write-Host
199
+ Write-Host
200
+ }
199
201
}
200
202
201
203
if ($CalcBaseline.IsPresent ) {
@@ -207,8 +209,8 @@ if ($CalcBaseline.IsPresent) {
207
209
CommandCoverage = $cvgOverall
208
210
}
209
211
$cvgReportOverall | Export-Csv - Path $cvgReportCsv - Encoding utf8 - NoTypeInformation - Append - Force
210
- }
211
212
212
- Write-Host " ##[section]Overall commands # : $overallCommandsCount " - ForegroundColor Magenta
213
- Write-Host " ##[section]Overall tested commands # : $overallTestedCommandsCount " - ForegroundColor Magenta
214
- Write-Host " ##[section]Overall test coverage % : $cvgOverall " - ForegroundColor Magenta
213
+ Write-Host " ##[section]Overall commands # : $overallCommandsCount " - ForegroundColor Magenta
214
+ Write-Host " ##[section]Overall tested commands # : $overallTestedCommandsCount " - ForegroundColor Magenta
215
+ Write-Host " ##[section]Overall test coverage % : $cvgOverall " - ForegroundColor Magenta
216
+ }
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ $cvgMessageHeader80 = "|Type|Title|Current Coverage|Last Coverage|Description|`n
36
36
37
37
$rptData | Where-Object Module -in $testedModules | ForEach-Object {
38
38
$module = $_.Module
39
- Write-Host " ##[section]Validating test coverage for module $module ..."
39
+ Write-Host " ##[section]Validating test coverage for module $module ..."
40
40
41
41
$cmdCvg = $_.CommandCoverage
42
42
$cmdCvgD = [decimal ]$cmdCvg.TrimEnd (" %" ) / 100
You can’t perform that action at this time.
0 commit comments