Switching some unit tests to doctest#5383
Conversation
|
Happy to help with this as I can. Will take a look this evening. Please communicate with me here if there's something you'd like to ask. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #5383 +/- ##
=========================================
- Coverage 79.1% 79.1% -0.0%
=========================================
Files 817 816 -1
Lines 71705 71605 -100
Branches 8240 8240
=========================================
- Hits 56716 56618 -98
+ Misses 14989 14987 -2 🚀 New features to boost your workflow:
|
thejohnfreeman
left a comment
There was a problem hiding this comment.
Tests build and pass on my machine. 👍
conanfile.py
Outdated
| 'external/*', | ||
| 'include/*', | ||
| 'src/*', | ||
| 'tests/*', |
There was a problem hiding this comment.
This line is no longer needed if you're using src/tests instead of tests. I still recommend tests as a matter of convention.
.github/workflows/nix.yml
Outdated
| ${build_dir}/rippled --unittest --unittest-jobs $(nproc) | ||
| cd ${build_dir} | ||
| ./rippled --unittest --unittest-jobs $(nproc) | ||
| ctest -j $(nproc) |
There was a problem hiding this comment.
I'd suggest adding --output-on-failure so that we can get more meaningful logs if a test case fails
| @@ -0,0 +1,4 @@ | |||
| # Unit tests | |||
There was a problem hiding this comment.
Under the src folder, there's a test folder and a tests folder. do we want to merge them? it doesn't look so clean to me
There was a problem hiding this comment.
this is temporary structure. We want to gradually rewrite tests using rippled's own test framework to use doctest. Those re-written tests are going into tests folder. Older tests remain in their current test folder for now. Some day in the future when we move all tests to new framework, old test folder will be deleted. I've made a readme describing this approach but I understand this is still confusing. I'm open to better options
|
@vvysokikh1 can you please address the review comments & resolve the conflicts? This change would be perfect for the next release. |
6319dec to
9257c9b
Compare
Comments addressed |
…refactoring-1 * upstream/develop: (56 commits) Remove `include(default)` from libxrpl profile (#5587) refactor: Change boost::shared_mutex to std::shared_mutex (#5576) Fix macos runner (#5585) Remove the type filter from "ledger" RPC command (#4934) refactor: Update date, libarchive, nudb, openssl, sqlite3, xxhash packages (#5567) test: Run unit tests regardless of 'Supported' amendment status (#5537) Retire Flow Cross amendment (#5562) chore: Update CI to use Conan 2 (#5556) fixAMMClawbackRounding: adjust last holder's LPToken balance (#5513) chore: Add gcc-12 workaround (#5554) Add MPT related txns into issuer's account history (#5530) chore: Remove unused headers (#5526) fix: add allowTrustLineLocking flag for account_info (#5525) Downgrade required CMake version for Antithesis SDK (#5548) fix: Link with boost libraries explicitly (#5546) chore: Fix compilation error with clang-20 and cleanup (#5543) test: Remove circular jtx.h dependencies (#5544) Decouple CredentialHelpers from xrpld/app/tx (#5487) fix: crash when trace-logging in tests (#5529) test: switch some unit tests to doctest (#5383) ...
High Level Overview of Change
This PR is continuation of work done by @thejohnfreeman. We intend to move from our unit tests framework to doctest.
Context of Change
Type of Change
.gitignore, formatting, dropping support for older tooling)API Impact
libxrplchange (any change that may affectlibxrplor dependents oflibxrpl)