Skip to content

Add SerialProgramsTests for running unit tests while running app - #1845

Open
dayfine wants to merge 4 commits into
PokemonAutomation:mainfrom
dayfine:upstream/headless-tests
Open

dayfine wants to merge 4 commits into
PokemonAutomation:mainfrom
dayfine:upstream/headless-tests

Conversation

@dayfine

@dayfine dayfine commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Adds a dedicated unit-test executable that can run while SerialPrograms is controlling a console. It uses QCoreApplication, skips settings and device discovery, and writes to its own log folder.

SerialProgramsTests is built by default (-DTEST_RUNNER_EXE=OFF disables it). Repeated --filter <text> arguments select tests by name substring; --list lists the selection. Exit status is the failure count capped at 254, or 255 for bad arguments/no matches. The existing GUI test mode keeps its 0/1 exit status. This improves the test-running workflow; both executables still build the same library.

How to review

Read the new TestRunner_Main.cpp and TestRunnerExecutable.cmake, then the filter/count changes in ComputerPrograms_UnitTestRunner and the command-line test wrapper. The existing test execution remains in the library; startup and shutdown for the new executable are new. The prerequisite use_qt_ui() change is already merged as #1843.

git diff --color-moved=dimmed-zebra --color-moved-ws=allow-indentation-change upstream/main...upstream/headless-tests

dayfine and others added 2 commits November 3, 2026 19:58
Run the existing test database through a dedicated QCoreApplication executable with isolated logs and no settings or device scans. Support name filters and listing while preserving the GUI test mode exit status.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@dayfine dayfine changed the title Add SerialProgramsTests for running unit tests without the GUI Add SerialProgramsTests for running unit tests while running app Nov 4, 2026
@dayfine
dayfine marked this pull request as ready for review November 4, 2026 04:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant