<html aria-label="message body"><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><br id="lineBreakAtBeginningOfMessage"><div><br><blockquote type="cite"><div>On Jan 9, 2026, at 12:54, Stefan Koch <stefan.koch.micro@gmail.com> wrote:</div><br class="Apple-interchange-newline"><div><div>I am recently retired with extra time on my hands and am interested in<br>helping the gnucash project.  It seems to have good overlap with my<br>skillset C++, Python/GUI/SQL, some lisp from emacs and older style c<br>coding.  To get started, since I don'\t know anything about the<br>codebase, I was thinking about either the python bindings, or the unit<br>test coverage (both of which I saw somewhere needed help).<br><br>I got further with unit test coverage, so my question is there.<br><br>Questions:<br>1. Is it belived that the end of stable should have clean tests?  If<br>   so, any suggestions on what I can look for to see what is different<br>   on my mashine?<br>2. Is there any value in the converage report if the tests are<br>   failing?<br>3. The libgnucash/engine coverage is listed at 75%, but when you look<br>   at the details, only the iso-4217-currencies.c file is listed at<br>   75%.  the libgnucash/engine/tests directory looks like it is doing<br>   much more.<br><br>Since it looks like I have done mostly what the live page did, it does<br>not look so good for the unit test coverage.  Is there something I can<br>do to help?  Any suggestions on how I can get started?<br><br><br>I did the following:<br>  git clone https://github.com/Gnucash/gnucash.git<br>  cd gnucash<br>  cmake -G Ninja -S. -Bbuild-coverage<br>-DCMAKE_INSTALL_PREFIX=$HOME/gnc-dev-install -DWITH_PYTHON=ON<br>-DCOVERAGE=ON -DGUILE_COVERAGE=ON -DLEAKS=ON -DCMAKE_BUILD_TYPE=Asan<br>  cd build-coverage<br>  ninja lcov-initialize<br>  ninja check<br><br>The ninja check reported errors.  I was not expecting that.  Here is<br>the straight ctest output (Just the failed lines).<br>   The following tests FAILED:<br>          1 - test-exp-parser (Failed)<br>          3 - test-sx (Failed)<br>          4 - test-gnc-quotes (Failed)<br>          5 - test-autoclear (Failed)<br>          7 - test-kvp-frames (Failed)<br>          9 - test-load-xml2 (Failed)<br>         10 - test-load-example-account (Failed)<br>         11 - test-load-save-files (Failed)<br>         12 - test-xml-contents (Failed)<br>         14 - test-xml-account (Failed)<br>         15 - test-xml-commodity (Failed)<br>         16 - test-xml-pricedb (Failed)<br>         17 - test-xml-transaction (Failed)<br>         19 - test-backend-dbi (Failed)<br>         21 - test-sqlbe (Failed)<br>         22 - test-gnc-glib-utils (Failed)<br>         33 - test-engine (Failed)<br>         40 - test-transaction-reversal (Failed)<br>         41 - test-transaction-voiding (Failed)<br>         51 - test-kvp-value (Failed)<br>         59 - test-import-map (Failed)<br>         63 - test-load-c (Failed)<br>         68 - test-link-module-tax-us (Failed)<br>         69 - test-invoice-report-builtin-default (Failed)<br>         70 - test-assistant-stock-transaction (Failed)<br>         71 - test-load-gnome-utils-module (Failed)<br>         72 - test-import-parse (Failed)<br>         73 - test-import-pending-matches (Failed)<br>         76 - test-aqb (Failed)<br>         81 - test-qif-imp (Failed)<br>         82 - test-qif-parse (Failed)<br>         83 - test-qif-merge-groups (Failed)<br>         84 - test-split-register-copy-ops (Failed)<br>         85 - test-standard-category-report (Failed)<br>         86 - test-standard-net-linechart (Failed)<br>         87 - test-standard-net-barchart (Failed)<br>         88 - test-cashflow-barchart (Failed)<br>         89 - test-charts (Failed)<br>         90 - test-transaction (Failed)<br>         91 - test-account-summary (Failed)<br>         92 - test-balsheet-pnl (Failed)<br>         93 - test-income-gst (Failed)<br>         94 - test-budget (Failed)<br>         95 - test-register (Failed)<br>         96 - test-trial-balance (Failed)<br>         97 - test-equity-statement (Failed)<br>         98 - test-average-balance (Failed)<br>         99 - test-ifrs-cost-basis (Failed)<br>        100 - test-invoice (Failed)<br>        101 - test-new-owner-report (Failed)<br>        102 - test-owner-report (Failed)<br>        103 - test-portfolios (Failed)<br>        104 - test-stress-options (Failed)<br>        105 - test-cash-flow (Failed)<br>        106 - test-load-report-module (Failed)<br>        107 - test-test-extras (Failed)<br>        108 - test-commodity-utils (Failed)<br>        109 - test-report-utilities (Failed)<br>        110 - test-html-utilities-srfi64 (Failed)<br>        111 - test-html-fonts (Failed)<br>        112 - test-html-chart (Failed)<br>        113 - test-report-html (Failed)<br>        114 - test-report (Failed)<br>        115 - test-scm-query (Failed)<br>        116 - test-create-account (Failed)<br>        117 - test-core-utils (Failed)<br>        118 - test-business-core (Failed)<br>        119 - test-scm-engine (Failed)<br>        120 - test-scm-kvpvalue (Failed)<br>        121 - test-options (Failed)<br>        122 - test-scm-utilities (Failed)<br>        123 - test-module-deprecation (Failed)<br>        124 - test-c-interface (Failed)<br>        125 - test-load-app-utils-module (Failed)<br>        126 - test-gnc-optiondb (Failed)<br>        127 - test-gnc-option-scheme-output (Failed)<br>        128 - test-date-utilities (Failed)<br>        129 - test-print-queries (Failed)<br>        130 - test-scm-query-string (Failed)<br>        131 - sqlite3test (Failed)<br>        132 - python-bindings (Failed)<br><br>Then I tried "ninja lcov-collect" to see about the covertage.  This failed with:<br>    [13/28] cd /home/sk/gnucash/build....-coverage/libgnucash/engine<br>&& lcov --quiet --exclude "/usr/loc...gine/CMakeFiles/gnc-engine.dir<br>-o /home/sk/gnucash/build-coverage/Coverage/gnc-engine_result.inf<br>    Message summary:<br>      21 ignore messages:<br>        mismatch: 14<br>        unused</div></div></blockquote><div><br></div><br><blockquote type="cite"><div><div>: 7<br>    ninja: build stopped: subcommand failed.<br><br>I got the full set of commands with "ninja -n lcov-collect" and<br>running all without stoping on failure. Then I did the "ninja<br>lcov-generate-html" which was sucessful.  The resulting report looks<br>like one one online at:<br>https://gnucash.github.io/gnucash/Coverage-HTML/<br></div></div></blockquote><br></div><div>Stefan,</div><div><br></div><div>Working with unit tests would be a great way to learn the code base. </div><div><br></div><div>Perhaps you misunderstand how the aggregate for libgnucash/engine is computed. 75% doesn’t mean that every file is at 75% coverage or that 75% coverage is the worst file. It means that there are 26572 lines and 5301 functions in all of the files in libgnucash/engine and that 17661 lines and 2775 functions are covered. (And yes, that’s not 75% it’s 66.5% of lines and 52.3% of functions, the score in this afternoon’s coverage run.</div><div><br></div><div>Note that in <a href="https://gnucash.github.io/gnucash/Coverage-HTML/">https://gnucash.github.io/gnucash/Coverage-HTML/</a> you can drill right down to the file to see which functions and lines need attention.</div><div><br></div><div>But before you start work you need to get a clean build. All of the tests should pass, </div><div><br></div><div>Note that Linux has a linkage problem if you have GnuCash installed in a way that <a href="http://ld.so">ld.so</a>.conf can see it: The linux linker isn’t very smart and it will link the installed libraries in preference to the just-built ones. That’s also true for Guile, which is even less bright. That means that you need to construct a build environment that’s isolated from where GnuCash is installed. I think the easiest way to do that is to use a flatpak GnuCash for your accounting work and develop on the system. More difficult possibilities are to set up a build environment in a flatpak sandbox or construct a chroot jail to develop in.</div><div><br></div><div>One other thing: ninja check is *supposed* to build everything, but I never trust it. I always run ninja && ninja check.</div><div><br></div><div>If that’s not the problem or if you still can’t get tests to pass after isolating your build then you’ll need to dig into the test failures—the detailed test output is in ${topbuilddir}//Testing/Temporary/LastTest.log and you can run individual tests wth `ctest -R test-name`. Add `-V` and it will print the output to stdout as well as to LastTest.log. </div><div><br></div><div>Regards,</div><div>John Ralls</div><div><br></div></body></html>