-
Notifications
You must be signed in to change notification settings - Fork 94
tests: introduce doctest infra + migrate llcommon/llmath/llcorehttp subsets (ctest green) [relates to #4445] #4852
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
tests: introduce doctest infra + migrate llcommon/llmath/llcorehttp subsets (ctest green) [relates to #4445] #4852
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
|
What are the changes to .gitignore and .gitattributes for? They seem in no relation to doctest and counterproductive, |
2acfa79 to
5fb6af0
Compare
…ubsets (ctest green) Signed-off-by: Maycon Bekkers <mayconbekkers@gmail.com>
5fb6af0 to
dddc098
Compare
|
@Ansariel Thanks for the note! I’ve dropped the unrelated .gitignore/.gitattributes edits so this PR stays focused on doctest. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a doctest-based unit testing framework to complement the existing TUT infrastructure, migrating initial test suites for llcommon, llmath, and llcorehttp. The changes keep the current TUT framework intact while establishing new doctest targets for gradual migration.
Key Changes
- Added header-only doctest framework with shared test helpers (
LL_CHECK_*macros for floating-point, range, and buffer comparisons) - Migrated 227 test cases across three modules:
llcommon_doctest(100 cases),llmath_doctest(93 cases),llcorehttp_doctest(34 cases) - Created deterministic HTTP test fakes (zero-latency transport, monotonic clock, queued responses) for network-free testing
Reviewed Changes
Copilot reviewed 66 out of 68 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
tools/testing/gen_tut_to_doctest.py |
Python script to auto-generate doctest stubs from TUT sources |
indra/test/{doctest_main.cpp,ll_doctest_helpers.h,tut_compat_doctest.h} |
Shared doctest infrastructure and TUT compatibility layer |
indra/llmath/tests_doctest/*.cpp |
Migrated vector/matrix/quaternion math tests to doctest |
indra/llcorehttp/tests_doctest/{http_fakes.h,http_fakes.cpp} |
Deterministic HTTP testing infrastructure |
indra/llcorehttp/tests_doctest/*_test_doctest.cpp |
Migrated HTTP component tests with fake transport |
indra/llcommon/tests_doctest/*_test_doctest.cpp |
Auto-generated TODO stubs for future llcommon migration |
indra/viewer_components/login/tests/lllogin_doctest.cpp |
New doctest-based login workflow tests |
indra/*/CMakeLists.txt |
Build configuration for new doctest targets |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Hey @akleshchev Thanks a lot for taking a look and for requesting the review here. Just to clarify: this PR is only meant to be a first step for a doctest-based test setup, not the full migration. I wanted to get early feedback before going any further. I also saw on Discord that Signal is stepping away, and I really appreciate that @Geenz is keeping the open source program moving forward. If this approach to the doctest infra, the CMake wiring and the way I’m migrating these first tests looks reasonable from your side, I’m happy to continue in follow-up PRs and adjust things to match what you’d like to see in the test suite. No rush at all, I know there’s a lot happening right now. Just wanted to make the intent clear and let you know I’m around to iterate on this. |
Relates to #4445.
This PR adds a header-only doctest setup and migrates a first wave of unit tests while keeping the legacy TUT harness for suites not yet ported. The goal is to land a minimal, working baseline that the team can iterate on module by module.
This affects only unit-test targets behind LL_TESTS=ON; viewer runtime and packages are unchanged.
What’s included
How to run locally
Scope / non-goals
Does not change viewer runtime or packaging.
TUT remains for non-migrated suites; removal will happen after follow-ups when coverage is sufficient.
Proposed follow-ups
Continue migrating remaining suites per module (llcommon -> llmath -> llcorehttp -> newview/test).
Once coverage is high enough, remove Tut.cmake glue and clean up LLAddBuildTest.cmake usage.