Having issues getting the test coverage to work.
Stefan Koch
stefan.koch.micro at gmail.com
Sat Jan 10 08:53:50 EST 2026
Thanks for the reply.
So, I have made a clean debian 13 vm and still have much the same
errors as I did before.
I am happy to drill down into the issues. I just wanted to make sure
that my build system is setup properly.
Do people that have been doing ongoing development get the same many
failures that I do. If so I can get to work on fixing them. If not,
then I still have an issue with my build setup.
The reason that I think I may not is that if you drill down on the
coverage page https://gnucash.github.io/gnucash/Coverage-HTML/ into
the html engine page here:
https://gnucash.github.io/gnucash/Coverage-HTML/build/libgnucash/engine/index.html,
the only file that looks to be checked is the iso-4217-currencies.c
file. That is why I thought there may be a problem. If there was at
least some coverage on more files in libgnucash/engine I would have
expected to see them there. I know there are more tests for it.
Maybe they all fail and therefore are not shown in the coverage
report.
Drilling down looks confusing. Specifically, the test-cashobject.c
test does not show up as a failed test, but the
libgnucash/engine/cashobject.cpp does not show up in the coverage
summary.
These are the errors I still get on a clean VM:
The following tests FAILED:
1 - test-exp-parser (Failed)
3 - test-sx (Failed)
4 - test-gnc-quotes (Failed)
5 - test-autoclear (Failed)
7 - test-kvp-frames (Failed)
9 - test-load-xml2 (Failed)
10 - test-load-example-account (Failed)
11 - test-load-save-files (Failed)
12 - test-xml-contents (Failed)
14 - test-xml-account (Failed)
15 - test-xml-commodity (Failed)
16 - test-xml-pricedb (Failed)
17 - test-xml-transaction (Failed)
19 - test-backend-dbi (Failed)
21 - test-sqlbe (Failed)
22 - test-gnc-glib-utils (Failed)
33 - test-engine (Failed)
40 - test-transaction-reversal (Failed)
41 - test-transaction-voiding (Failed)
51 - test-kvp-value (Failed)
59 - test-import-map (Failed)
63 - test-load-c (Failed)
68 - test-link-module-tax-us (Failed)
69 - test-invoice-report-builtin-default (Failed)
70 - test-assistant-stock-transaction (Failed)
71 - test-load-gnome-utils-module (Failed)
72 - test-import-parse (Failed)
73 - test-import-pending-matches (Failed)
76 - test-aqb (Failed)
81 - test-qif-imp (Failed)
82 - test-qif-parse (Failed)
83 - test-qif-merge-groups (Failed)
84 - test-split-register-copy-ops (Failed)
85 - test-standard-category-report (Failed)
86 - test-standard-net-linechart (Failed)
87 - test-standard-net-barchart (Failed)
88 - test-cashflow-barchart (Failed)
89 - test-charts (Failed)
90 - test-transaction (Failed)
91 - test-account-summary (Failed)
92 - test-balsheet-pnl (Failed)
93 - test-income-gst (Failed)
94 - test-budget (Failed)
95 - test-register (Failed)
96 - test-trial-balance (Failed)
97 - test-equity-statement (Failed)
98 - test-average-balance (Failed)
99 - test-ifrs-cost-basis (Failed)
100 - test-invoice (Failed)
101 - test-new-owner-report (Failed)
102 - test-owner-report (Failed)
103 - test-portfolios (Failed)
104 - test-stress-options (Failed)
105 - test-cash-flow (Failed)
106 - test-load-report-module (Failed)
107 - test-test-extras (Failed)
108 - test-commodity-utils (Failed)
109 - test-report-utilities (Failed)
110 - test-html-utilities-srfi64 (Failed)
111 - test-html-fonts (Failed)
112 - test-html-chart (Failed)
113 - test-report-html (Failed)
114 - test-report (Failed)
115 - test-scm-query (Failed)
116 - test-create-account (Failed)
117 - test-core-utils (Failed)
118 - test-business-core (Failed)
119 - test-scm-engine (Failed)
120 - test-scm-kvpvalue (Failed)
121 - test-options (Failed)
122 - test-scm-utilities (Failed)
123 - test-module-deprecation (Failed)
124 - test-c-interface (Failed)
125 - test-load-app-utils-module (Failed)
126 - test-gnc-optiondb (Failed)
127 - test-gnc-option-scheme-output (Failed)
128 - test-date-utilities (Failed)
129 - test-print-queries (Failed)
130 - test-scm-query-string (Failed)
132 - python-bindings (Failed)
Errors while running CTest
On Fri, Jan 9, 2026 at 11:32 PM John Ralls <jralls at ceridwen.us> wrote:
>
>
>
> On Jan 9, 2026, at 12:54, Stefan Koch <stefan.koch.micro at gmail.com> wrote:
> [Removed a bunch of my stuff.]
>
> Working with unit tests would be a great way to learn the code base.
>
> 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.
>
> Note that in https://gnucash.github.io/gnucash/Coverage-HTML/ you can drill right down to the file to see which functions and lines need attention.
>
> But before you start work you need to get a clean build. All of the tests should pass,
>
> Note that Linux has a linkage problem if you have GnuCash installed in a way that ld.so.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.
>
> One other thing: ninja check is *supposed* to build everything, but I never trust it. I always run ninja && ninja check.
>
> 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.
>
> Regards,
> John Ralls
>
More information about the gnucash-devel
mailing list