Add thunder_test_support static library for plugin integration testing#2099
Closed
smanes0213 wants to merge 27 commits into
Closed
Add thunder_test_support static library for plugin integration testing#2099smanes0213 wants to merge 27 commits into
smanes0213 wants to merge 27 commits into
Conversation
calls _Exit() after RUN_ALL_TESTS() to avoid static destruction order crashes when external plugin .so files are loaded.
… Server::Close() Thunder's Server::Close() can crash when unloading plugin .so files due to C++ static destruction order issues between plugin statics (proxy stubs, JSON-RPC registrations) and Thunder singletons. The real daemon avoids this by calling exit(0) instead of returning from main().
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a new thunder_test_support static library intended to let GTest/GMock binaries boot an in-process Thunder PluginHost::Server (without running the standalone daemon) for plugin integration testing.
Changes:
- Adds
ThunderTestRuntime(C++ wrapper) to create temp runtime state, generate a minimal config, start/stop an embeddedPluginHost::Server, and provide JSON-RPC/COM-RPC helpers. - Adds CMake packaging/install support for the static library (including whole-archive linking) and a smoke test target.
- Adds a GitHub Actions workflow to build and run the smoke test and an external plugin integration test.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
Tests/test_support/ThunderTestRuntime.h |
Declares the public test runtime API (ThunderTestRuntime, JSONRPCLink). |
Tests/test_support/ThunderTestRuntime.cpp |
Implements runtime boot/shutdown, temp dir handling, JSON-RPC invoke and event plumbing. |
Tests/test_support/thunder_test_supportConfig.cmake.in |
Package config template with dependency finding + whole-archive link options. |
Tests/test_support/tests/SmokeTest.cpp |
Basic runtime smoke tests (Controller JSON-RPC + shell availability). |
Tests/test_support/tests/Module.h |
Test module header defining module name/export behavior. |
Tests/test_support/tests/Module.cpp |
Module build reference declaration for the smoke test binary. |
Tests/test_support/tests/CMakeLists.txt |
Builds and registers the smoke test executable. |
Tests/test_support/Module.h |
Library module header defining module name/export behavior. |
Tests/test_support/Module.cpp |
Archive module declaration for the static library. |
Tests/test_support/CMakeLists.txt |
Builds/installs thunder_test_support and wires whole-archive behavior + optional feature linkage. |
Tests/CMakeLists.txt |
Adds ENABLE_TEST_RUNTIME option and conditional subdirectory inclusion. |
.github/workflows/Test_Thunder_Test_Support.yml |
CI workflow to validate the new library and downstream plugin integration tests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Add docs/ThunderTestSupport/ThunderTestSupport.md covering the thunder_test_support static library introduced with ENABLE_TEST_RUNTIME=ON.
|
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Adds a static library (libthunder_test_support.a) that embeds the Thunder PluginHost::Server into a linkable archive. Test binaries link against this library to boot a real Thunder runtime without launching the standalone daemon, enabling integration testing of Thunder plugins using GTest/GMock.