Build benchmarks with scan-build on CI

This commit is contained in:
Max Brunsfeld 2017-07-06 10:22:14 -07:00
parent 8c005cddc6
commit 78333b70c0
2 changed files with 13 additions and 3 deletions

View file

@ -20,6 +20,8 @@ OPTIONS
-L run benchmarks with parse logging turned on
-b run make under the scan-build static analyzer
EOF
}
@ -30,8 +32,9 @@ fi
mode=normal
export BUILDTYPE=Test
cmd=out/Test/benchmarks
run_scan_build=
while getopts "dhf:l:SL" option; do
while getopts "bdhf:l:SL" option; do
case ${option} in
h)
usage
@ -49,10 +52,17 @@ while getopts "dhf:l:SL" option; do
L)
export TREE_SITTER_BENCHMARK_LOG=1
;;
b)
run_scan_build=true
;;
esac
done
make -j2 benchmarks
if [[ -n "$run_scan_build" ]]; then
scan_build make -j2 $target
else
make -j2 benchmarks
fi
case $mode in
debug)

View file

@ -7,4 +7,4 @@ set -e
script/fetch-fixtures
script/check-mallocs
script/test -b
script/benchmark
script/benchmark -b