memgraph/tools/apollo/cppcheck
Matej Ferencevic 9d1265f41f Initial version of macro benchmark summary script.
Summary:
Changed harness output to be compatible with script.

Changed cppcheck message formatting.

Changed qa message formatting.

Changed macro benchmark summary icons.

Fixed newlines in status generators.

Added group name to harness summary.

Macro benchmark summary now handles different files.

Added more output options to summary script.

Diff builds now build parent for performance comparison.

Reviewers: buda, mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D706
2017-08-24 15:11:36 +02:00

29 lines
630 B
Bash
Executable File

#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$DIR/../../"
errfile="$DIR/.cppcheck_errors"
if [ "$1" == "" ]; then
mode=diff
else
mode=$1
fi
if [ "$mode" == diff ]; then
files=$( git diff --name-only HEAD~1 HEAD | egrep '^(src|tests|poc)' | egrep '.(hpp|h|cpp)$' )
flags=""
else
files=src/
flags="-j$THREADS -Isrc"
fi
cppcheck --enable=all --force --suppress=missingInclude $flags $files 2>"$errfile"
cat "$errfile" >&2
len="$( cat "$errfile" | wc -l )"
if [ $len -gt 0 ]; then
echo -e "==== Cppcheck errors: ====\n\n\`\`\`\n$( cat "$errfile" )\n\`\`\`" > "$errfile"
fi