Repository navigation
Test the installed VI package and check that every test VI is called - #37
Merged
Merged
Conversation
The suite runs only the tests that tests/Test_MCP_Server.vi calls. A "test *.vi" added to tests/MCP Server tests.lvlib but never wired into Test_MCP_Server.vi was skipped without a message, and the suite still passed. tools/ci/Test-TestsWired.ps1 reads the test library's "test *.vi" members and looks each one up in the link table of Test_MCP_Server.vi, where LabVIEW keeps the names of the subVIs a VI calls. It needs no LabVIEW and takes under a second; its exit code is the number of test VIs that are not called. All 53 are called on main today. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CI built the .vip and uploaded it, but never installed it, so packaging mistakes went unnoticed: earlier packages put tools/ci/*.ps1 and a .git worktree pointer into vi.lib, and nothing failed. tools/ci/Test-InstalledPackage.ps1 fails on tools/, _ci/, tests/, .github/, builds/, .git, .ps1 and test-library entries in the package, installs it with vipm into the test LabVIEW, starts the installed Datalogger example from <LabVIEW>\examples\MCP Server through LabVIEW CLI, runs tools/test/Test-McpServer.ps1 against it, then closes that LabVIEW (the example's latched Stop button cannot be pressed from outside) and uninstalls the package. It refuses to run when the toolkit is already installed there, so a developer's own installation is never replaced or removed, and -ContentsOnly checks only the contents. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The template gets a "Check that Every Test VI Is Called" step before the Caraya suite in the review job, which fails the run like the other checks, and a "Test Installed Package" step after "Upload Test Package" in the test-build job. Both fall back to the pull request's copy of the script while main does not have it yet. .github/workflows/pull-request.yml itself is left to the maintainer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tests✅ All 53 tests passed. Per-test results
Protocol tests✅ Protocol tester output (0 failed required checks)VI changesVIs: 0 modified, 1 added, 0 deleted Report for commit 89278fd. The installable test package is under Artifacts of this run once the build job has finished. |
LabVIEW CLI's RunVI opens its target with a strictly typed reference, so it refuses any VI without the CLI connector pane (error 1031). The installed Datalogger example is an ordinary top-level VI and could not be started that way. tools/ci/Start VI.vi (new, LabVIEW 20.0) is run through RunVI with the example's path as its argument. It opens that VI, refuses a broken one, starts it with Run VI without waiting (Auto Dispose Ref) and returns at once, so the CLI call ends while the example keeps serving. Test-InstalledPackage.ps1 now calls it and then waits for the port. It also gives vipm 900 s instead of 60 s without progress from VIPM Desktop when no VIPM_DESKTOP_LIVELINESS_TIMEOUT is set; the first install into LabVIEW 2020 hit the 60 s limit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
Brings in #36, which keeps tools/ out of the VI package; the test build failed on the duplicate Print Diagram Frames.vi it removes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
Update: merged main (89278fd)
|
JanGoebel
marked this pull request as ready for review
October 20, 2026 12:24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
CI builds the
.vipand uploads it, but nothing ever installs it, so packaging mistakes go unnoticed. Earlier packages, for example, puttools/ci/*.ps1and a.gitworktree pointer into vi.lib. This PR tests the package users actually install, and adds a cheap check that every Caraya test VI is really run.tools/,_ci/,tests/,.git,.ps1)Test-McpServer.ps1test *.viin the test library but not wired intoTest_MCP_Server.viChanges
tools/ci/Test-TestsWired.ps1(new): reads thetest *.vimembers oftests/MCP Server tests.lvliband looks each one up in the link table oftests/Test_MCP_Server.vi, where LabVIEW stores the length-prefixed name of every subVI it calls. No LabVIEW is needed and it takes under a second. The exit code is the number of test VIs that are not called.tools/ci/Test-InstalledPackage.ps1(new):.vip(a zip) and fails on entries below the toolkit'stools/,_ci/,tests/,.github/orbuilds/, on any.git, on.ps1files and on the test library. The examples' owntools/folders are allowed.vipm installinto the test LabVIEW, with 900 s of allowed VIPM silence instead of 60 s. It refuses to run when the toolkit is already installed there (-Forceoverrides), so it never replaces or removes a developer's own installation, and it refuses when port 36987 is in use.<LabVIEW>\examples\MCP Server\examples\Datalogger MCP Server\Datalogger Main.vi, path taken from the package listing) withStart VI.vi. It waits until the example answersinitialize, then runstools/test/Test-McpServer.ps1against it. The installed example links to the installedjg_mcp_MCP Server.lvlib, so this also shows that the installed toolkit loads.CloseLabVIEW, thenStop-Processif it doesn't go) and runsvipm uninstall. Cleanup always runs. A report file is written.-ContentsOnlyruns step 1 alone, with no LabVIEW and no vipm.tools/ci/Start VI.vi(new VI, LabVIEW 20.0, standalone): LabVIEW CLIRunVIopens its target with a strictly typed reference and refuses any VI without the CLI connector pane (error 1031; the first local run hit exactly this). This launcher has that pane (Command Line Arguments/Exit Code/Output). It opens the VI named in argument 0, refuses it if it is broken, starts it withRun VI(Wait until done FALSE, Auto Dispose Ref TRUE) and returns at once, so the CLI call ends while the example keeps running. Exit Code 1 for no path, a missing file, a broken VI or any error, and the reason goes in Output. Green "CI" icon likePrint Diagram Frames.vi.tools/ci/pull-request.workflow.yml: two new steps (see Maintainer steps).tools/ci/README.md: one row per new file.Code summary
To follow once the review workflow has posted the VI diff for
Start VI.vi(one added VI): its block diagram and a short walk through it.Verified
All runs were local, on the dev VM, in LabVIEW 2020 64-bit (VI Server port 3365), with VIPM 26.3.2.
Test-InstalledPackage.ps1, passed (exit 0, 109 s), against a package built locally from PR Exclude tools/, _ci/ and .git from the VI package #36's branch (80b0514,vipm build252 s, version 2.2.6.37, 146 entries):tools/,_ci/,tests/,.github/,builds/,.git,.ps1or test-library entries;vipm install: 49 s;Datalogger Main.viwas started throughStart VI.vi(RunVI operation succeeded), and port 36987 was confirmed free before the start;Test-McpServer.ps1against it: 24 of 24 required checks passed, 0 advisory failed (4 tools, 1 prompt, 1 resource);CloseLabVIEW),vipm uninstallsucceeded, and the toolkit folder in vi.lib andexamples\MCP Serverwere gone afterwards.Start VI.vi). Both times the cleanup still closed LabVIEW and uninstalled the package.-ContentsOnlyon the earlier packagejgoebel_lib_labview_mcp_server_sdk-2.6.1.10.vip: it fails as expected on 6 entries (.git,tools/ci/*.ps1,pull-request.workflow.yml,README.md).Start VI.viin LabVIEW 2026 (by the LabVIEW agent): Exit Code 1 for an empty argument array, a missing file, a non-VI file and a broken VI. Exit Code 0 for a 20 s scratch loop, which kept running after the launcher returned. The file holds only 20.0 version stamps.Test-TestsWired.ps1: 53 of 53 test VIs are called, exit 0. Negative control: a library copy with an extra membertest not wired in.vigives exit 1 and names that VI.Not verified
.vipinside a git checkout; in CI the package is built into the workspace, so that should hold, but it hasn't been measured there.Known rough edges
main(without PR Exclude tools/, _ci/ and .git from the VI package #36), the content check fails, as it should: it findstools/and.gitin the package. Merge Exclude tools/, _ci/ and .git from the VI package #36 first, or expect this step to fail on PRs until then.test.Start VI.viruns the target without opening its front panel, so the example's Stop button is not visible; nothing here needs it.Maintainer steps
Edit
.github/workflows/pull-request.yml, or copytools/ci/pull-request.workflow.ymlover it once this PR is merged:reviewjob, before "Run Caraya Test Suite", add the step "Check that Every Test VI Is Called" (id: wired,continue-on-error: true). Then add|| steps.wired.outcome == 'failure'to theif:of "Fail if the Tests or the VI Diff Failed", and add the wiring result to its error line.test-buildjob, after "Upload Test Package", add the step "Test Installed Package" (timeout-minutes: 30,VIPM_CLI_TIMEOUT: 1200,VIPM_DESKTOP_LIVELINESS_TIMEOUT: 900). It callsTest-InstalledPackage.ps1with-VipPath $env:VIP_PATH -RepoDir $env:GITHUB_WORKSPACE -LabVIEWPath $env:LABVIEW_PATH -PortNumber $env:LABVIEW_PORTand appends the report to the job summary.Both steps take the script from main and fall back to the PR's own copy while main doesn't have it yet. The exact YAML is in the template's diff.
🤖 Generated with Claude Code