diff --git a/compile/eclipsebuild/eclipseds5build.groovy b/compile/eclipsebuild/eclipseds5build.groovy index 63c8d45..888ad1e 100644 --- a/compile/eclipsebuild/eclipseds5build.groovy +++ b/compile/eclipsebuild/eclipseds5build.groovy @@ -40,7 +40,7 @@ def doCheck(checkpathlist, build_variant = "") { // Print out dependencies of the built file echo "Showing dependencies of ${srcFileExpanded}" result = sh( script: """ - readelf -d "${srcFileExpanded}" | grep NEEDED + readelf -d "${srcFileExpanded}" if [ \$? -ne 0 ]; then exit 1; fi """, returnStatus: true diff --git a/staticanalysis/ccm.groovy b/staticanalysis/ccm.groovy index 290c897..93e4711 100644 --- a/staticanalysis/ccm.groovy +++ b/staticanalysis/ccm.groovy @@ -63,9 +63,18 @@ pipeline { script { def CCMOLDER = "${STATICANALYSIS}/ccm" dir(CCMOLDER) { - bat """ - "${CCM}" "${SRC}" /xml /nummetrics=100 > ccm.xml - """ + echo "Executing: ${CCM} ${SRC} /xml /nummetrics=100 > ccm.xml" + if (isUnix()) { + sh """#!/bin/bash + find "${SRC}" -type f ! -name "*.cpp" -a ! -name "*.h" -a ! -name "*.hpp" -a ! -name "*.c" -exec rm -r {} \; + # Uses mono + "${CCM}" "${SRC}" /xml /nummetrics=100 > ccm.xml + """ + } else { + bat """ + "${CCM}" "${SRC}" /xml /nummetrics=100 > ccm.xml + """ + } } recordIssues(tools: [ ccm(pattern: "**/ccm.xml", reportEncoding: 'UTF-8'), diff --git a/staticanalysis/cppcheck.groovy b/staticanalysis/cppcheck.groovy index b3b997e..59323c1 100644 --- a/staticanalysis/cppcheck.groovy +++ b/staticanalysis/cppcheck.groovy @@ -57,9 +57,18 @@ pipeline { script { def CPPCHECKFOLDER = "${STATICANALYSIS}/cppcheck" dir(CPPCHECKFOLDER) { - bat """ - "${CPPCHECK}" --xml --xml-version=2 "${SRC}" 2> cppcheck.xml - """ + echo "Executing: ${CPPCHECK} --xml --xml-version=2 ${SRC} 2> cppcheck.xml" + if (isUnix()) { + sh """#!/bin/bash + set -e + + "${CPPCHECK}" --xml --xml-version=2 "${SRC}" 2> cppcheck.xml + """ + } else { + bat """ + "${CPPCHECK}" --xml --xml-version=2 "${SRC}" 2> cppcheck.xml + """ + } } recordIssues(tools: [ cppCheck(pattern: "**/cppcheck.xml", reportEncoding: 'UTF-8'),