chiark / gitweb /
Hook up oss-fuzz test cases as tests
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 19 Jan 2018 06:54:30 +0000 (17:54 +1100)
committerSven Eden <yamakuzure@gmx.net>
Wed, 30 May 2018 05:50:20 +0000 (07:50 +0200)
commit982bf4f3897a1ff9253cac7bc2f90a7984207f37
tree7637ebef3ba36ff438eb0054b15b0f2c38a4dd08
parentb378688cfed10574fc103527aaa230f0cb4c498d
Hook up oss-fuzz test cases as tests

This is a bit painful because a separate build of systemd is necessary. The
tests are guarded by tests!=false and slow-tests==true. Running them is not
slow, but compilation certainly is. If this proves unwieldy, we can add a
separate option controlling those builds later.

The build for each sanitizer has its own directory, and we build all fuzzer
tests there, and then pull them out one-by-one by linking into the target
position as necessary. It would be nicer to just build the desired fuzzer, but
we need to build the whole nested build as one unit.

[I also tried making systemd and nested meson subproject. This would work
nicely, but meson does not allow that because the nested target names are the
same as the outer project names. If that is ever fixed, that would be the way
to go.]

v2:
- make sure things still work if memory sanitizer is not available
v3:
- switch to syntax which works with meson 0.42.1 found in Ubuntu
meson.build
tools/meson-build.sh [new file with mode: 0644]