Meson has a test subcommand that can be used to run an executable as a test harness.
We can make it so:
there’s a tests subdirectory with a meson.build that requires that requires the libani.so
the top-level meson.build does libani = library(...) and then calls subdir('tests')
the tests/meson.build just defines a bunch of test executables via test()
The neat thing is that we can have (1) tests built and executed straight from meson (2) we can use TAP! The downside (imo) is that each meson test is not a single test, but a test harness, so the final report will give the number of failed harnesses not the total of failed tests.
Meson has a
test
subcommand that can be used to run an executable as a test harness.We can make it so:
tests
subdirectory with a meson.build that requires that requires the libani.solibani = library(...)
and then callssubdir('tests')
test()
The neat thing is that we can have (1) tests built and executed straight from meson (2) we can use TAP! The downside (imo) is that each meson test is not a single test, but a test harness, so the final report will give the number of failed harnesses not the total of failed tests.