project-spiel / libspiel

Speech synthesis client library
https://project-spiel.org/libspiel
GNU Lesser General Public License v2.1
39 stars 4 forks source link

test: add test suite targeting the C library directly #45

Closed andyholmes closed 5 months ago

andyholmes commented 6 months ago

Spiel's API and language-bindings are feature-tested with Python, but getting line coverage and performing sanitizer runs under these conditions is difficult (or impossible).

Add an additional test suite with GLib tests, which can be run under a sanitizer and produce better reports.

andyholmes commented 6 months ago

Some notes, in exchange for your thoughts:

I made several attempts to get ASAN to run with the existing tests, but couldn't manage it. I've used the approach here before, which uses python-dbusmock as a subprocess pass-through for a GLib test executable.

I'll add a meson condition so that unless ASAN is run, the existing tests will also run. Although it is/was more work, I think it's probably better to have a C-based suite testing for safety and the Python-based suite testing for API correctness.

Lastly, I maintain the "actuary" action for myself, but it would be trivial for me to add Dockerfile and script to this repo. I expect making it an Ubuntu CI would not be much work either.