From 83f3c8d831479e18d998970f7502bd1a4b4062bf Mon Sep 17 00:00:00 2001 From: Calmy Jane Date: Sat, 24 Oct 2026 16:02:28 +0400 Subject: [PATCH 1/3] Write icon and summary pictures where a relative -OutFile points New-VIIcon.ps1 and New-SummaryImage.ps1 handed -OutFile straight to Bitmap.Save. .NET resolves a relative path against the process working directory, which is not the PowerShell location after Set-Location, so the picture could land in another folder than the one named. Both scripts now resolve -OutFile against the PowerShell location first. Co-Authored-By: Claude Opus 5.5 --- tools/ci/New-SummaryImage.ps1 | 3 +++ tools/icons/New-VIIcon.ps1 | 3 +++ 2 files changed, 6 insertions(+) diff --git a/tools/ci/New-SummaryImage.ps1 b/tools/ci/New-SummaryImage.ps1 index dd9b554..d00b780 100644 --- a/tools/ci/New-SummaryImage.ps1 +++ b/tools/ci/New-SummaryImage.ps1 @@ -96,6 +96,9 @@ try { } finally { $g.Dispose() } + # .NET resolves a relative path against the process directory, not the + # PowerShell location, so resolve it here. + $OutFile = $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath($OutFile) $dir = Split-Path -Parent $OutFile if ($dir -and -not (Test-Path $dir)) { New-Item -ItemType Directory -Force $dir | Out-Null } $out.Save($OutFile, [System.Drawing.Imaging.ImageFormat]::Png) diff --git a/tools/icons/New-VIIcon.ps1 b/tools/icons/New-VIIcon.ps1 index ea5a850..ee82709 100644 --- a/tools/icons/New-VIIcon.ps1 +++ b/tools/icons/New-VIIcon.ps1 @@ -120,6 +120,9 @@ switch ($Style) { $tops = switch ($Lines.Count) { 1 { , 19 } 2 { 15, 23 } 3 { 13, 19, 25 } } for ($i = 0; $i -lt $Lines.Count; $i++) { Write-Ink $Lines[$i] $tops[$i] } +# .NET resolves a relative path against the process directory, not the +# PowerShell location, so resolve it here. +$OutFile = $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath($OutFile) $dir = Split-Path -Parent $OutFile if ($dir -and -not (Test-Path $dir)) { New-Item -ItemType Directory -Path $dir | Out-Null } $bmp.Save($OutFile, [System.Drawing.Imaging.ImageFormat]::Png) From b8591ab2b355a3fd973f3b969263909e6ab60b97 Mon Sep 17 00:00:00 2001 From: Calmy Jane Date: Sat, 24 Oct 2026 16:02:28 +0400 Subject: [PATCH 2/3] Report the real cause when the installed-package test fails early - When the installed example did not answer, Test-McpServer.ps1 exits with 99 and the summary said "99 required checks failed". It now says the example did not answer at the URL. - A -LabVIEWPath that does not exist threw from Resolve-Path. It now stops with "::error:: does not exist." like the other checks. Co-Authored-By: Claude Opus 5.5 --- tools/ci/Test-InstalledPackage.ps1 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/ci/Test-InstalledPackage.ps1 b/tools/ci/Test-InstalledPackage.ps1 index 68b7260..421f305 100644 --- a/tools/ci/Test-InstalledPackage.ps1 +++ b/tools/ci/Test-InstalledPackage.ps1 @@ -116,6 +116,7 @@ if (-not $LabVIEWPath) { if (-not $lv) { Write-Host '::error::No -LabVIEWPath given and no LabVIEW 2020 64-bit found.'; exit 1 } $LabVIEWPath = $lv.Path } +if (-not (Test-Path -LiteralPath $LabVIEWPath -PathType Leaf)) { Write-Host "::error::$LabVIEWPath does not exist."; exit 1 } $lvInfo = Get-LabVIEWInstall | Where-Object { $_.Path -ieq (Resolve-Path -LiteralPath $LabVIEWPath).Path } | Select-Object -First 1 if (-not $lvInfo) { Write-Host "::error::$LabVIEWPath is not a LabVIEW installation."; exit 1 } $lvDir = Split-Path $lvInfo.Path -Parent @@ -238,7 +239,10 @@ try { Write-Step 'Protocol tests against the installed example' $tester = Join-Path $RepoDir 'tools\test\Test-McpServer.ps1' $code = Invoke-Native 'powershell.exe' @('-NoProfile', '-ExecutionPolicy', 'Bypass', '-File', $tester, '-Url', $ServerUrl) - if ($code -ne 0) { Write-Failure "Test-McpServer.ps1: $code required checks failed against the installed example." } + # Test-McpServer.ps1 exits with the number of failed required checks, or 99 + # when the server does not answer at all. + if ($code -eq 99) { Write-Failure "Test-McpServer.ps1: the installed example did not answer at $ServerUrl." } + elseif ($code -ne 0) { Write-Failure "Test-McpServer.ps1: $code required checks failed against the installed example." } else { Write-Line 'PASS: every required protocol check passed against the installed example.' } } catch { From bbf507fcad7823e44524f41d2510038681827893 Mon Sep 17 00:00:00 2001 From: Calmy Jane Date: Sat, 24 Oct 2026 16:02:28 +0400 Subject: [PATCH 3/3] Default the VI diff to the 32-bit LabVIEW 2026 on port 3363 Run by hand without -LabVIEWPath, New-ViDiffReport.ps1 compared in LabVIEW 2020 on port 3365. The working agreement says to compare in the 32-bit LabVIEW 2026 on port 3363, where nobody develops and no other checkout's MCP Server.lvlib is loaded. The defaults now say so. The workflow passes both values explicitly and is unaffected. Co-Authored-By: Claude Opus 5.5 --- tools/ci/New-ViDiffReport.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/ci/New-ViDiffReport.ps1 b/tools/ci/New-ViDiffReport.ps1 index e538442..6ea90e5 100644 --- a/tools/ci/New-ViDiffReport.ps1 +++ b/tools/ci/New-ViDiffReport.ps1 @@ -37,8 +37,8 @@ param( [Parameter(Mandatory = $true)][string]$BaseRef, [Parameter(Mandatory = $true)][string]$OutDir, [string]$HeadDir = (Resolve-Path (Join-Path $PSScriptRoot '..\..')).Path, - [string]$LabVIEWPath = 'C:\Program Files\National Instruments\LabVIEW 2020\LabVIEW.exe', - [int]$PortNumber = 3365 + [string]$LabVIEWPath = 'C:\Program Files (x86)\National Instruments\LabVIEW 2026\LabVIEW.exe', + [int]$PortNumber = 3363 ) $ErrorActionPreference = 'Stop'