auto-fuzz-test
auto-fuzz-test copied to clipboard
Better unit testing with workspaces
Our unit tests works as follows:
- Copy 'tests/test-lib' to target
- Build 'target/test-lib' (this invokes our macro and creates 'target/test-lib/fuzz' directory with different fuzz-targets)
- Build each fuzz-target in 'target/test-lib/fuzz/fuzz_targets'
The disadvantage of this approach is that if macro produces code, which fails to compile, all the tests will fail. Alternative is to create not just a crate 'test-lib', but a set of workspaces, which (1) can be compiled independently (2) shares a common dependencies cache.