Files
simdjson-simdjson/fuzz/measure_coverage.sh
T
Paul Dreik f93fb21c95 optionally disable deprecated apis (#1271)
Introduce cmake option SIMDJSON_DISABLE_DEPRECATED_API (default Off)
which turns off deprecated simdjson api functions by setting the macro
 SIMDJSON_DISABLE_DEPRECATED_API.

For non-cmake users, users will have to set SIMDJSON_DISABLE_DEPRECATED_API
by some other means to disable the api.

Closes #1264
2020-11-01 06:38:52 +01:00

36 lines
797 B
Bash
Executable File

#!/bin/sh
#
# makes a coverage build.
#
# To measure and display the coverage:
#
#cd build-coverage
#fuzz/fuzz_parser path/to/corpus/* # repeat with other fuzzers
#gcovr -r . --html --html-details --sort-uncovered -o out.html
# and view the results in out.html
bdir=build-coverage
if [ ! -d $bdir ] ; then
mkdir -p $bdir
cd $bdir
export CC=gcc
export CXX="g++"
export CFLAGS="-fprofile-arcs -ftest-coverage"
export CXXFLAGS="-fprofile-arcs -ftest-coverage"
export LDFLAGS="-fprofile-arcs -ftest-coverage"
cmake .. \
-GNinja \
-DCMAKE_BUILD_TYPE=Debug \
-DSIMDJSON_BUILD_STATIC=On \
-DENABLE_FUZZING=On \
-DSIMDJSON_DISABLE_DEPRECATED_API=On \
-DSIMDJSON_FUZZ_LINKMAIN=On
ninja all_fuzzers
cd ..
fi