FuzzTest#

The $pw_external_fuzztest/ module provides build files to allow optionally including upstream FuzzTest.

Using upstream FuzzTest#

If you want to use FuzzTest, you must do the following:

Submodule#

  • pw_fuzzer_fuzztest_backend to @com_google_fuzztest//fuzztest.

The easiest way to do this is to ensure your .bazelrc includes Pigweed’s pw_fuzzer/fuzztest.bazelrc, and then include the fuzztest config on the command line.

For example:

$ bazel test //... --config=fuzztest --config=asan
$ git submodule add https://github.com/google/fuzztest.git \
> third_party/fuzztest

Set the following CMake variables:

  • Set dir_pw_third_party_fuzztest to the location of the FuzzTest source.

  • Set dir_pw_third_party_googletest to the location of the GoogleTest source.

  • Set pw_unit_test_BACKEND to pw_third_party.fuzztest.