-
Notifications
You must be signed in to change notification settings - Fork 208
Coverage
Joe Drago edited this page Oct 7, 2020
·
1 revision
libavif has basic code coverage report support via clang (LLVM) and aviftest. Here's a basic example:
# Ensure you're using clang (skip this if it is the default on your system)
export CC=clang
export CXX=clang++
# build AOM locally (or any other codecs, optional)
cd ext
$SHELL aom.cmd
cd ..
# build libavif with local codecs and coverage enabled. Tweak the cmake commandline as appropriate.
mkdir build
cd build
cmake -G Ninja -DBUILD_SHARED_LIBS=0 -DAVIF_CODEC_AOM=1 -DAVIF_LOCAL_AOM=1 -DAVIF_ENABLE_COVERAGE=1 -DAVIF_BUILD_TESTS=1 ..
# Generate a coverage report via aviftest
ninja avif_coverage