Hi Stepan,

> Hello Aleksander! I'm a beginner and I would like to see and try your patch. 
> However, I have never worked with coverage in regression tests for 
> PostgreSQL. Could you please tell me how it works and help me understand the 
> process? Thanks!

You are going to need some Linux distribution, GCC stack and lcov 1.16
[1]. (Lcov doesn't work with Clang; We seem to experience some
problems with lcov 2.0+, this is being investigated [2])

Apply the patch as usual ( git clone
git://git.postgresql.org/git/postgresql.git ; git am ... ) and run:

```
git clean -dfx && meson setup --buildtype debug
-DPG_TEST_EXTRA="kerberos ldap ssl" -Db_coverage=true -Dldap=disabled
-Dssl=openssl -Dcassert=true -Dtap_tests=enabled
-Dprefix=/home/eax/pginstall build && ninja -C build &&
PG_TEST_EXTRA=1 meson test -C build && ninja -C build coverage-html
```

Note the `-Db_coverage=true` and `ninja -C build coverage-html` parts.
Change `prefix` to an appropriate one. This will take longer than
usual. Your coverage report will be located in
build/meson-logs/coveragereport. You can compare the reports with and
without the patch to ensure that the patch improves code coverage.

[1]: https://github.com/linux-test-project/lcov/releases/tag/v1.16
[2]: 
https://postgr.es/m/CAJ7c6TN%2BMCh99EZ8YGhXZAdnqvNQYir6E34B_mmcB5KsxCB00A%40mail.gmail.com

-- 
Best regards,
Aleksander Alekseev


Reply via email to