Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions tools/ci/New-SummaryImage.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions tools/ci/New-ViDiffReport.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
6 changes: 5 additions & 1 deletion tools/ci/Test-InstalledPackage.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand Down
3 changes: 3 additions & 0 deletions tools/icons/New-VIIcon.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading