aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/run-sonar.sh
diff options
context:
space:
mode:
authorMauro Sardara <msardara@cisco.com>2022-08-29 17:05:25 +0000
committerMauro Sardara <msardara@cisco.com>2022-08-29 17:08:06 +0000
commit8656478230c9bb319ba1279ef0c9cffce0f37853 (patch)
treea461b210ace38d85e36f3861c2a78e4074764231 /scripts/run-sonar.sh
parent020099fdb3b1a0fa482f8813c7a7147c1720fbc8 (diff)
ci(sonar): build with coverage information
Also: - Install clang-11 as default compiler with make deps Ref: HICN-752 Change-Id: Id6faf99ddd9c43a1c5804b8ace8df9dad27b82e6 Signed-off-by: Mauro Sardara <msardara@cisco.com>
Diffstat (limited to 'scripts/run-sonar.sh')
-rwxr-xr-xscripts/run-sonar.sh13
1 files changed, 7 insertions, 6 deletions
diff --git a/scripts/run-sonar.sh b/scripts/run-sonar.sh
index 7bb179d05..38547bbcf 100755
--- a/scripts/run-sonar.sh
+++ b/scripts/run-sonar.sh
@@ -22,11 +22,12 @@ cd /workspace
git config --global --add safe.directory /workspace
git config --global --add safe.directory /workspace/cmake
-$HOME/.sonar/build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir bw-output make build
+export SONAR_BUILD_WRAPPER=$HOME/.sonar/build-wrapper-linux-x86/build-wrapper-linux-x86-64
+make SONAR_OUT_DIR=bw-output build-coverage
$SONAR_SCANNER_HOME/bin/sonar-scanner \
--Dsonar.organization=$PROJECT_ORGANIZATION \
--Dsonar.projectKey=$PROJECT_KEY \
--Dsonar.sources=/workspace \
--Dsonar.cfamily.build-wrapper-output=bw-output \
--Dsonar.host.url=$SONAR_HOST_URL
+ -Dsonar.organization=$PROJECT_ORGANIZATION \
+ -Dsonar.projectKey=$PROJECT_KEY \
+ -Dsonar.sources=/workspace \
+ -Dsonar.cfamily.build-wrapper-output=bw-output \
+ -Dsonar.host.url=$SONAR_HOST_URL