It's extremely out of date and we no longer use it to keep track
of our design decisions and suggestions.
Only a section on KVP policy has been move into kvp_doc.txt
as it may make sense there.
To use pass -DCMAKE_BUILD_TYPE=Debug or Asan -DCOVERAGE=ON and build as
usual, then do ninja lcov-initialize && ninja check && ninja
lcov-collect. The result will be a directory, <Builddir>/Coverage
containing lcov tracefiles, including an aggregate file gnucash.info
which you can use for further processing. It will also report an overall summary.
Note that only C/C++ files are included.
There's one more target, lcov-generate-html, that you can run after
lcov-collect. It will generate a simple website in
<Builddir>/Coverage-HTML showing coverage by source directory (the
directories in <Builddir> have coverage for generated files). Each
directory path is a clickable link to a page that shows coverage for
each source file; the filenames link to a page for each showing which
lines have been exercised.
GLib 2.76 introduced a no-discard warning on g_string_free
if the second parameter is FALSE. This revealed a string
leak and a correct usage that didn't use the return value.
significantly
Modify the DEBUG and PINFO macros to return unless qof_log_check is
true. Replace almost all direct calls to g_debug and g_message with
DEBUG and PINFO respectively.
Track the highest logging level sent to qof_log_set_level to provide a
short-circuit return in qof_log_check. Remove setting GNC_MOD_TESTS to
QOF_LOG_DEBUG so that the short-circuit threshold isn't defeated by
always being DEBUG.
Net result: 33% improvement in xml load times.
resulting in a double free crash on every exit.
Exclude by name the obsolete pre-GnuCash 4 modules from being inspected
so that they don't try to construct and destroy their static variables
twice.
The test passed but for the wrong reasons:
as no GNC_MODULE_PATH was passed to the test
it just didn't find the module. That's different
from finding a module with the same name but
a wrong sysver. This commit fixes that.
- move test modules into a subdirectory on Windows as well
- move the futuremod module into its own subdirectory
to avoid its load warnings each time gnc_module_init is called
That also tends to happen when building guile modules.
- remove the log handlers filtering out the futuremodsys warnings
They didn't match the actual warning signature anyway and
they're no longer emitted during testing
This is a first rudimentary separation of gnc-module tests
based on whether they require guile or not. Needs plenty of refinement
which will be applied in followup commits.
This reverts commit 1a9fcfefad because
on MinGW cmake complains about the paths in pkgconfig files. This can
be addressed by using the MSYS2 cmake instead of the MINGW32 one, but
that requires some other changes... and there's also a path separator
bug in that version of FindPkgConfig.cmake.
There were several issues:
- we store the compiled test*.go files in a tests subdirectory, but this is not
on the GUILE_LOAD_COMPILED_PATH. Added this directory to the path.
- guile was looking for 'script.scm.go' while we create 'script.go'. This is due
to how we invoke the scripts: guile -l path-to-script.scm -c (something)
we can replace this with -l path-to-script (without extension) as -l won't add
the extension. So I've rewrittin the test command to invoke (load-from-path).
- the test modules foo.scm, bar.scm and baz.scm should go in tests/gnucash
as they are defined as modules (gnucash foo), (gnucash bar) and (gnucash baz)
respectively.
- find html.scm/go on the load path instead of using a relative path.
Instead of random locations only occasionally related to the
corresponding source.
Includes renaming libgnucash/engine/test/test-extras.scm and
gnucash/report/report-system/test/test-extras.scm to avoid a
naming conflict.
When building from git it will add targets to generate the swig files.
When building from tarball it will just point at the generated source
files from the tarball.
I.e., remove the shell invocation and with it the need to set the shebang.
Surprisingly this required some build-system modifications particularly
for cmake in order to correctly set the environment.