From 989f86547f344cf96d65f5105abb3f717b9e30a8 Mon Sep 17 00:00:00 2001 From: aparnajyothi-y <147696841+aparnajyothi-y@users.noreply.github.com> Date: Tue, 8 Oct 2024 17:05:37 +0530 Subject: [PATCH 1/4] Update python-tests.ps1 --- tests/python-tests.ps1 | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/tests/python-tests.ps1 b/tests/python-tests.ps1 index 706a3b42..52f7fcc2 100644 --- a/tests/python-tests.ps1 +++ b/tests/python-tests.ps1 @@ -18,16 +18,22 @@ BeforeAll { $pattern = "$searchStringStart(.*?)$searchStringEnd" $buildContent = Get-Content -Path $buildOutputLocation - $splitBuiltOutput = $buildContent -split "\n"; + $splitBuiltOutput = $buildContent -split "\n" ### Search for missing modules that are displayed between the search strings - $regexMatch = [regex]::match($SplitBuiltOutput, $Pattern) - if ($regexMatch.Success) - { + $regexMatch = [regex]::match($splitBuiltOutput, $pattern) + if ($regexMatch.Success) { $module = $regexMatch.Groups[1].Value.Trim() Write-Host "Failed missing modules:" Write-Host $module - if ( ($module -eq "_tkinter") -and ( [semver]"$($Version.Major).$($Version.Minor)" -ge [semver]"3.10" -and $Version.PreReleaseLabel ) ) { + try { + $semver = [semver]"$($Version.Major).$($Version.Minor)" + } catch { + Write-Error "Invalid Semantic Version format: $Version" + return 1 + } + + if (($module -eq "_tkinter") -and ($semver -ge [semver]"3.10") -and $Version.PreReleaseLabel) { Write-Host "$module $Version ignored" } else { return 1 @@ -54,7 +60,7 @@ Describe "Tests" { # linux has no display name and no $DISPLAY environment variable - skip tk test # if (-not (($Platform -match "ubuntu") -or ($Platform -match "linux"))) { # It "Check if tcl/tk has the same headed and library versions" { - # "python ./sources/tcltk.py" | Should -ReturnZeroExitCode + # "python ./sources/tcltk.py" | Should -ReturnZeroExitCode # } # } From 8038923f910a9c1ab266fcd2cf289cd23c632edc Mon Sep 17 00:00:00 2001 From: aparnajyothi-y <147696841+aparnajyothi-y@users.noreply.github.com> Date: Tue, 8 Oct 2024 17:28:06 +0530 Subject: [PATCH 2/4] Update python-tests.ps1 --- tests/python-tests.ps1 | 52 +++++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/tests/python-tests.ps1 b/tests/python-tests.ps1 index 52f7fcc2..9d805129 100644 --- a/tests/python-tests.ps1 +++ b/tests/python-tests.ps1 @@ -13,35 +13,35 @@ Import-Module (Join-Path $PSScriptRoot "../builders/python-version.psm1") BeforeAll { function Analyze-MissingModules([string] $buildOutputLocation) { - $searchStringStart = "Failed to build these modules:" - $searchStringEnd = "running build_scripts" - $pattern = "$searchStringStart(.*?)$searchStringEnd" - - $buildContent = Get-Content -Path $buildOutputLocation - $splitBuiltOutput = $buildContent -split "\n" - - ### Search for missing modules that are displayed between the search strings - $regexMatch = [regex]::match($splitBuiltOutput, $pattern) - if ($regexMatch.Success) { - $module = $regexMatch.Groups[1].Value.Trim() - Write-Host "Failed missing modules:" - Write-Host $module - try { - $semver = [semver]"$($Version.Major).$($Version.Minor)" - } catch { - Write-Error "Invalid Semantic Version format: $Version" - return 1 - } - - if (($module -eq "_tkinter") -and ($semver -ge [semver]"3.10") -and $Version.PreReleaseLabel) { - Write-Host "$module $Version ignored" - } else { - return 1 - } + $searchStringStart = "Failed to build these modules:" + $searchStringEnd = "running build_scripts" + $pattern = "$searchStringStart(.*?)$searchStringEnd" + + $buildContent = Get-Content -Path $buildOutputLocation + $splitBuiltOutput = $buildContent -split "\n" + + ### Search for missing modules that are displayed between the search strings + $regexMatch = [regex]::match($splitBuiltOutput, $pattern) + if ($regexMatch.Success) { + $module = $regexMatch.Groups[1].Value.Trim() + Write-Host "Failed missing modules:" + Write-Host $module + try { + $semver = [semver]"$($Version.Major).$($Version.Minor)" + } catch { + Write-Error "Invalid Semantic Version format: $Version" + return 1 } - return 0 + if (($module -eq "_tkinter") -and ($semver -ge [semver]"3.10") -and $Version.PreReleaseLabel) { + Write-Host "$module $Version ignored" + } else { + return 1 + } } + + return 0 +} } Describe "Tests" { From 852aa61b4149eb224ae01942ae4b85ae670f7970 Mon Sep 17 00:00:00 2001 From: aparnajyothi-y <147696841+aparnajyothi-y@users.noreply.github.com> Date: Tue, 8 Oct 2024 17:41:36 +0530 Subject: [PATCH 3/4] Update python-tests.ps1 --- tests/python-tests.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/python-tests.ps1 b/tests/python-tests.ps1 index 9d805129..d130ab5f 100644 --- a/tests/python-tests.ps1 +++ b/tests/python-tests.ps1 @@ -33,7 +33,7 @@ BeforeAll { return 1 } - if (($module -eq "_tkinter") -and ($semver -ge [semver]"3.10") -and $Version.PreReleaseLabel) { + if (($module -eq "_tkinter") -and ($semver -ge [semver]"3.8") -and $Version.PreReleaseLabel) { Write-Host "$module $Version ignored" } else { return 1 From 7a0de94d02c8eca03ddea1dec12d22db16b0c3b7 Mon Sep 17 00:00:00 2001 From: aparnajyothi-y <147696841+aparnajyothi-y@users.noreply.github.com> Date: Tue, 8 Oct 2024 18:00:40 +0530 Subject: [PATCH 4/4] Update python-tests.ps1 --- tests/python-tests.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/python-tests.ps1 b/tests/python-tests.ps1 index d130ab5f..f60f8b5b 100644 --- a/tests/python-tests.ps1 +++ b/tests/python-tests.ps1 @@ -33,7 +33,7 @@ BeforeAll { return 1 } - if (($module -eq "_tkinter") -and ($semver -ge [semver]"3.8") -and $Version.PreReleaseLabel) { + if (($module -eq "_tkinter") -and ($semver -ge [semver]"3.8")) { Write-Host "$module $Version ignored" } else { return 1