aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/run-sonar.sh
diff options
context:
space:
mode:
authorMauro Sardara <msardara@cisco.com>2022-09-14 16:17:22 +0200
committerMauro Sardara <msardara@cisco.com>2022-09-14 16:26:27 +0200
commit34e32b751d8060f93646d3fa542ddea73de901c4 (patch)
tree7ebb988de951fcddc7312c3a5b337c874350219b /scripts/run-sonar.sh
parent6c9f120f028bcca93fd087afa648f653b208eb35 (diff)
ci: correctly generate tests reports
Do not use make test to run the tests after the build, as it overwrites the report file for each single unit tests. Signed-off-by: Mauro Sardara <msardara@cisco.com> Change-Id: Icdc55b31c1e36b213f977b76f8518ac16c393afc
Diffstat (limited to 'scripts/run-sonar.sh')
-rwxr-xr-xscripts/run-sonar.sh11
1 files changed, 3 insertions, 8 deletions
diff --git a/scripts/run-sonar.sh b/scripts/run-sonar.sh
index 3d386bbfc..87a94b592 100755
--- a/scripts/run-sonar.sh
+++ b/scripts/run-sonar.sh
@@ -6,6 +6,9 @@ set -euxo pipefail
# PROJECT_KEY=fdio-hicn
# PROJECT_ORGANIZATION=fdio
+SCRIPT_PATH=$( cd "$(dirname "${BASH_SOURCE}")" ; pwd -P )
+source "${SCRIPT_PATH}/functions.sh"
+
export SONAR_TOKEN=$API_TOKEN
export SONAR_SCANNER_VERSION=4.7.0.2747
export SONAR_SCANNER_HOME=$HOME/.sonar/sonar-scanner-$SONAR_SCANNER_VERSION-linux
@@ -30,14 +33,6 @@ make SONAR_BUILD_WRAPPER=${HOME}/.sonar/build-wrapper-linux-x86/build-wrapper-li
# Run tests to compute test coverage
pushd ${BUILD_PATH}
-declare -a TEST_COMPONENTS=(
- "libtransport"
- "lib"
- "hicn_light"
- "hicnplugin"
- "libhicnctrl"
-)
-
# Save first test executable
FIRST_COMPONENT="${TEST_COMPONENTS[0]}"
FIRST_TEST="${TEST_PATH}/${FIRST_COMPONENT}_tests"