node-mapnik icon indicating copy to clipboard operation
node-mapnik copied to clipboard

coverity scan

Open springmeyer opened this issue 10 years ago • 2 comments
trafficstars

We should set up a branch that we can push to in order to run coverity scan occasionally on travis. I just created a "node-mapnik" project tonight: https://scan.coverity.com/projects/4362 (and invited @flippmoke as an owner).

And then downloaded the osx scan tools from https://scan.coverity.com/download?tab=cxx and pushed a first build with this script locally:

#!/usr/bin/env bash

set -eo pipefail

COVERITY_VERSION="7.6.0"

export PATH=${HOME}/cov-analysis-macosx-${COVERITY_VERSION}/bin/:$PATH

export CC=/usr/bin/clang
export CXX="/usr/bin/clang++ -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/"
rm -rf build/Release
./node_modules/.bin/node-pre-gyp configure

RESULTS_DIR="$(pwd)/cov-int"
mkdir -p $RESULTS_DIR
rm -rf $RESULTS_DIR/*
rm -f ${HOME}/cov-analysis-macosx-${COVERITY_VERSION}/config/templates/.DS_Store
rm -rf ${HOME}/cov-analysis-macosx-${COVERITY_VERSION}/config/template-clangcc-config-0
rm -rf ${HOME}/cov-analysis-macosx-${COVERITY_VERSION}/config/template-clangcxx-config-0
cov-configure --template --compiler clang --comptype clangcc
cov-build -dir $RESULTS_DIR make -C ./build/ -j1 V=1
rm -f mapnik-coverity.tgz
DESCRIBE=$(git describe)
tar czf mapnik-coverity.tgz cov-int
curl --form token=${COVERITY_TOKEN_NODE_MAPNIK} \
  --form [email protected] \
  --form [email protected] \
  --form version="${DESCRIBE}" \
  --form description="node-mapnik" \
  https://scan.coverity.com/builds?project=mapnik%2Fnode-mapnik

Next step would be to set up travis builds to push results.

springmeyer avatar Feb 26 '15 08:02 springmeyer

@springmeyer part of me wonders if this is worth the complexity of doing this currently?

flippmoke avatar Mar 18 '15 04:03 flippmoke

@flippmoke yes, this is worth it. Next action: @springmeyer sets up a nightly cron job to post results.

springmeyer avatar May 07 '15 19:05 springmeyer