Commit d5a5ec43 authored by PRUVOST Florent's avatar PRUVOST Florent

build and tests considered already done + improve cppcheck

parent dca366bc
#!/bin/bash
# Performs an analysis of ScalFMM source code
# We consider to be in ScalFMM's source code root
# build with proper options
cd Build && cmake .. -DSCALFMM_USE_LOG=ON -DSCALFMM_USE_ASSERT=ON -DSCALFMM_USE_SSE=OFF -DSCALFMM_USE_BLAS=ON -DSCALFMM_USE_FFT=ON -DSCALFMM_USE_MPI=ON -DSCALFMM_USE_STARPU=ON -DSCALFMM_BUILD_EXAMPLES=ON -DSCALFMM_BUILD_TESTS=ON -DSCALFMM_BUILD_UTESTS=ON -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_CXX_FLAGS="-O0 -g -fPIC --coverage -Wall -fdiagnostics-show-option -fno-inline" -DCMAKE_EXE_LINKER_FLAGS="--coverage" -DCMAKE_C_COMPILER=gcc-6 -DCMAKE_CXX_COMPILER=g++-6
# make with clang analyzer (failure ...)
#scan-build -plist --intercept-first --analyze-headers -o analyzer_reports make 2>&1 | tee scalfmm-build.log
# ctest : build and run tests + coverage + submit to cdash
OMP_NUM_THREADS=4 ctest --no-compress-output -V -j 5 -D ExperimentalBuild -D ExperimentalTest -D ExperimentalCoverage -D ExperimentalSubmit 2>&1 | tee -a ../scalfmm-build.log
cd ..
# We consider:
# 1) to be in ScalFMM's source code root
# 2) ScalFMM built into the ./Build directory
# 3) ctests with coverage results should have been performed
# capture coverage
lcov --directory Build --capture --output-file scalfmm.lcov
......@@ -24,8 +19,8 @@ export SOURCES_TO_ANALYZE="Src Examples Tests UTests"
# commented for now because too long
export CPPCHECK_INCLUDES="-IBuild/Src -ISrc -IContribs"
export SOURCES_TO_ANALYZE="Src Examples Tests UTests"
export CPPCHECK_UNDEF="-USCALFMM_USE_AVX -USCALFMM_USE_AVX2 -USCALFMM_USE_SSE -USCALFMM_USE_EZTRACE -USCALFMM_BLAS_UPCASE -U__AVXPE_INTEL_COMPILER -U__INTEL_COMPILER -U__MIC__ -U__SSEPE_INTEL_COMPILER -U__SSSE3__ -U__SSSE4_1__ -U_WIN32 -Uming -U_MSC_VER -U__IBMCPP__ -U__PGI -U__SUNPRO_CC -U__clang__"
cppcheck -v -f --language=c++ --platform=unix64 --enable=all --xml --xml-version=2 --suppress=missingIncludeSystem ${CPPCHECK_UNDEF} ${CPPCHECK_INCLUDES} ${SOURCES_TO_ANALYZE} 2> scalfmm-cppcheck.xml
export CPPCHECK_UNDEF="-USCALFMM_USE_AVX -USCALFMM_USE_AVX2 -USCALFMM_USE_SSE -USCALFMM_USE_EZTRACE -USCALFMM_BLAS_NOCHANGE -USCALFMM_BLAS_UPCASE -U__AVXPE_INTEL_COMPILER -U__INTEL_COMPILER -U__MIC__ -U__SSEPE_INTEL_COMPILER -U__SSSE3__ -U__SSSE4_1__ -U_WIN32 -Uming -U_MSC_VER -U__IBMCPP__ -U__PGI -U__SUNPRO_CC -U__clang__ -U__APPLE__ -U__HP_aCC -U__HP_cc -U__ICC"
cppcheck -v -f --language=c++ --std=c++14 --platform=unix64 --enable=all --xml --xml-version=2 --suppress=missingIncludeSystem ${CPPCHECK_UNDEF} ${CPPCHECK_INCLUDES} ${SOURCES_TO_ANALYZE} 2> scalfmm-cppcheck.xml
# run rats analysis
rats -w 3 --xml ${SOURCES_TO_ANALYZE} > scalfmm-rats.xml
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment