Improve sonarqube analysis to cover more code path. (#2381)

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
This commit is contained in:
László Langó
2018-06-20 03:34:49 +02:00
committed by yichoi
parent 86ecc81130
commit 7f56756e11
2 changed files with 50 additions and 9 deletions
+1 -9
View File
@@ -117,15 +117,7 @@ matrix:
organization: "jerryscript-project"
token:
secure: "C1QD99nllAQndSDj4uIQPWCK0jBYrC5P0IrpdhfG7li7uvdzphUM++z3zkhYeeTJR3flw/cr8d9saYlbMjGw2eZ7AdJPFy4FJ1doBXD2amIuepaG1e829SLnJner9VA+d/8j28m7lZNtvZF5efbrS4KOicijNixmJy2PKG0K2035fs6MHLdywF8cJhyMaoRiMvYahIZEjXMvPBSgG1m4+A3PpzyN8XijwOT47cVtCLav4L21Mc7LcHsrc3LeyhtEJ+cs7Lx9WDQDwXX9iCRTA5ByqrXsS4rBV/N3lJI5M9p68Yj94Qy2OvVeCmUZ4ezwuuwkX00vBUk2f4eZx3oFAp973ekA8EGm/5qEvHVcbjHoHLbfUxsAKQHVoExXGdM5r1KeVgxLDT2FSQnBZLoxIrtGOUqFEOL4WX5YaQNoUKvYFO+CNvsMQkNg65QzLinRfqcH20KjzAsVeFwVI/j87J2VjooM8910savpw53iVBNPqmO/lG3kzFL7L2p1FeOuyEg9ANAbMhAXt3SL2srT0xni+ysg4Iwq+IkU+hkQWsvM8Voz+QJmiotFsi1Pzakcu3IOlT8lVVyn5q0z59YVDht/6if7acqkZ3X5vldeNIZYkImmYhMebScxVhzAa8AS6/81A+zJ8lW1+RWJQtP3uPM1+Dq18iFkPrCEMZwtoXI="
script:
if [[ "${TRAVIS_REPO_SLUG}" == "jerryscript-project/jerryscript"
&& ${TRAVIS_BRANCH} == "master"
&& ${TRAVIS_EVENT_TYPE} == "push" ]];
then
git fetch --unshallow;
build-wrapper-linux-x86-64 --out-dir bw-output ./tools/build.py;
sonar-scanner -Dsonar.projectVersion="${TRAVIS_COMMIT}";
fi
script: tools/check-sonarqube.sh
cache:
directories:
- '${HOME}/.sonar/cache'
+49
View File
@@ -0,0 +1,49 @@
#!/bin/bash
# Copyright JS Foundation and other contributors, http://js.foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
if [[ "${TRAVIS_REPO_SLUG}" == "jerryscript-project/jerryscript"
&& ${TRAVIS_BRANCH} == "master"
&& ${TRAVIS_EVENT_TYPE} == "push" ]]
then
git fetch --unshallow
build-wrapper-linux-x86-64 --out-dir bw-output \
./tools/build.py --error-messages=on \
--jerry-cmdline-snapshot=on \
--jerry-debugger=on \
--jerry-libc=off \
--line-info=on \
--mem-stats=on \
--profile=es2015-subset \
--snapshot-save=on \
--snapshot-exec=on \
--valgrind=on \
--vm-exec-stop=on
sonar-scanner -Dsonar.projectVersion="${TRAVIS_COMMIT}"
else
# SonarQube analysis works only on the master branch.
# Ensure the build works with the options used for the analysis.
./tools/build.py --error-messages=on \
--jerry-cmdline-snapshot=on \
--jerry-debugger=on \
--jerry-libc=off \
--line-info=on \
--mem-stats=on \
--profile=es2015-subset \
--snapshot-save=on \
--snapshot-exec=on \
--valgrind=on \
--vm-exec-stop=on
fi