@@ -9,29 +9,31 @@ Import-Module (Join-Path $PSScriptRoot "../helpers/pester-extensions.psm1")
99Import-Module (Join-Path $PSScriptRoot " ../helpers/common-helpers.psm1" )
1010Import-Module (Join-Path $PSScriptRoot " ../builders/python-version.psm1" )
1111
12- function Analyze-MissingModules ([string ] $buildOutputLocation ) {
13- $searchStringStart = " Failed to build these modules:"
14- $searchStringEnd = " running build_scripts"
15- $pattern = " $searchStringStart (.*?)$searchStringEnd "
12+ BeforeAll {
13+ function Analyze-MissingModules ([string ] $buildOutputLocation ) {
14+ $searchStringStart = " Failed to build these modules:"
15+ $searchStringEnd = " running build_scripts"
16+ $pattern = " $searchStringStart (.*?)$searchStringEnd "
1617
17- $buildContent = Get-Content - Path $buildOutputLocation
18- $splitBuiltOutput = $buildContent -split " \n" ;
18+ $buildContent = Get-Content - Path $buildOutputLocation
19+ $splitBuiltOutput = $buildContent -split " \n" ;
1920
20- # ## Search for missing modules that are displayed between the search strings
21- $regexMatch = [regex ]::match($SplitBuiltOutput , $Pattern )
22- if ($regexMatch.Success )
23- {
24- $module = $regexMatch.Groups [1 ].Value.Trim()
25- Write-Host " Failed missing modules:"
26- Write-Host $module
27- if ( ($module -eq " _tkinter" ) -and ( [semver ]" $ ( $Version.Major ) .$ ( $Version.Minor ) " -ge [semver ]" 3.10" -and $Version.PreReleaseLabel ) ) {
28- Write-Host " $module $Version ignored"
29- } else {
30- return 1
21+ # ## Search for missing modules that are displayed between the search strings
22+ $regexMatch = [regex ]::match($SplitBuiltOutput , $Pattern )
23+ if ($regexMatch.Success )
24+ {
25+ $module = $regexMatch.Groups [1 ].Value.Trim()
26+ Write-Host " Failed missing modules:"
27+ Write-Host $module
28+ if ( ($module -eq " _tkinter" ) -and ( [semver ]" $ ( $Version.Major ) .$ ( $Version.Minor ) " -ge [semver ]" 3.10" -and $Version.PreReleaseLabel ) ) {
29+ Write-Host " $module $Version ignored"
30+ } else {
31+ return 1
32+ }
3133 }
32- }
3334
34- return 0
35+ return 0
36+ }
3537}
3638
3739Describe " Tests" {
0 commit comments