sonar_create_report.sh.in 834 Bytes
#!/bin/bash
#test if sonar is running
@TREPS_SONAR_INSTALL_DIR@/bin/linux-x86-64/sonar.sh status
if [ ${?} -ne 0 ]; then
  exit 1
fi

#remove previous reports
rm @TREPS_INSTALL_DIR@/bin/kernel/valgrind-report-*.xml

rm @TREPS_KERNEL_SRC@/test/Sonar/reports/*

#run fitnesse suite
@TREPS_INSTALL_DIR@/test/Fitnesse/scripts/fitnesse_run_suite.sh

#copy valgrind reports in sonar reports dir
cp @TREPS_INSTALL_DIR@/bin/kernel/valgrind-report-*.xml @TREPS_KERNEL_SRC@/test/Sonar/reports

#run cppcheck
cd @TREPS_KERNEL_SRC@
@TREPS_CPPCHECK_INSTALL_DIR@/cppcheck -v --enable=all --xml --xml-version=1 src/ 2> @TREPS_KERNEL_SRC@/test/Sonar/reports/cppcheck-report.xml

#run sonar runner to generate sonar report
@TREPS_SONARRUNNER_INSTALL_DIR@/bin/sonar-runner -Dproject.settings=@TREPS_KERNEL_SRC@/test/Sonar/conf/sonar-project.properties