From 3a08402554ee334d056b995ddb7408d2051c40ab Mon Sep 17 00:00:00 2001 From: guwirth Date: Fri, 26 Aug 2016 17:15:36 +0200 Subject: [PATCH] update Travis and Appveyor CI to SQ 5.6.1 and Scanner 2.6.1 change "...Cannot find the file..." from INFO to WARN change "...The report ... seems to be empty" from INFO to WARN fix Travis build, see https://github.com/travis-ci/travis-ci/issues/5227#issuecomment-165131913 --- .travis.yml | 22 +++++++++++-------- appveyor.yml | 14 ++++++------ integration-tests/features/environment.py | 2 +- .../importing_cppcheck_reports.feature | 4 ++-- 4 files changed, 23 insertions(+), 19 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1250597847..1727225b63 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,16 +6,20 @@ jdk: env: - SONARHOME=/tmp/sonarqube-5.6.1 -matrix: - fast_finished: true +#matrix: +# fast_finished: true # allow_failures: # - env: SONARHOME=/tmp/sonarqube-5.5 +# shorten the VM hostname with the new workaround +# https://github.com/travis-ci/travis-ci/issues/5227#issuecomment-165131913 +addons: + hosts: + - myshorthost + hostname: myshorthost + before_install: - - cat /etc/hosts # optionally check the content *before* - - sudo hostname "$(hostname | cut -c1-63)" - - sed -e "s/^\\(127\\.0\\.0\\.1.*\\)/\\1 $(hostname | cut -c1-63)/" /etc/hosts | sudo tee /etc/hosts - - cat /etc/hosts # optionally check the content *after* + - cat /etc/hosts # optionally check the content - travis_retry sudo apt-add-repository -y ppa:boost-latest/ppa - travis_retry sudo apt-get -qq update - travis_retry sudo apt-get -qq install boost1.55 @@ -24,8 +28,8 @@ install: - cd /tmp - travis_retry wget -q https://sonarsource.bintray.com/Distribution/sonarqube/sonarqube-5.6.1.zip - unzip -qq sonarqube-5.6.1.zip - - travis_retry wget -q https://sonarsource.bintray.com/Distribution/sonar-scanner-cli/sonar-scanner-2.6.zip - - unzip -qq sonar-scanner-2.6.zip + - travis_retry wget -q https://sonarsource.bintray.com/Distribution/sonar-scanner-cli/sonar-scanner-2.6.1.zip + - unzip -qq sonar-scanner-2.6.1.zip - cd - before_script: @@ -36,7 +40,7 @@ before_script: script: - mvn install -DskipTests=true - mvn test - - RAILS_ENV=production PATH=$PATH:/tmp/sonar-scanner-2.6/bin TestDataFolder=~/build/SonarOpenCommunity/sonar-cxx/integration-tests/testdata behave --no-capture + - RAILS_ENV=production PATH=$PATH:/tmp/sonar-scanner-2.6.1/bin TestDataFolder=~/build/SonarOpenCommunity/sonar-cxx/integration-tests/testdata behave --no-capture after_failure: - cat $SONARHOME/logs/sonar.log diff --git a/appveyor.yml b/appveyor.yml index 4bb041cfb4..05e8a50564 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -11,17 +11,17 @@ install: } if (!(Test-Path -Path "C:\sonar-scanner" )) { (new-object System.Net.WebClient).DownloadFile( - 'https://sonarsource.bintray.com/Distribution/sonar-scanner-cli/sonar-scanner-2.6.zip', + 'https://sonarsource.bintray.com/Distribution/sonar-scanner-cli/sonar-scanner-2.6.1.zip', 'C:\sonar-scanner-dist.zip' ) [System.IO.Compression.ZipFile]::ExtractToDirectory("C:\sonar-scanner-dist.zip", "C:\sonar-scanner") } if (!(Test-Path -Path "C:\sonarqube" )) { (new-object System.Net.WebClient).DownloadFile( - 'https://sonarsource.bintray.com/Distribution/sonarqube/sonarqube-5.6.zip', - 'C:\sonarqube-5.6.zip' + 'https://sonarsource.bintray.com/Distribution/sonarqube/sonarqube-5.6.1.zip', + 'C:\sonarqube-5.6.1.zip' ) - [System.IO.Compression.ZipFile]::ExtractToDirectory("C:\sonarqube-5.6.zip", "C:\sonarqube") + [System.IO.Compression.ZipFile]::ExtractToDirectory("C:\sonarqube-5.6.1.zip", "C:\sonarqube") } - ps: | If ($env:Platform -Match "x86") { @@ -37,8 +37,8 @@ install: $env:VCVARS_PLATFORM="amd64" $env:LANG_PLATFORM="-x64" } - - cmd: SET PATH=C:\maven\apache-maven-3.2.5\bin;%JAVA_HOME%\bin;C:\sonar-scanner\sonar-scanner-2.6\bin;%PATH% - - cmd: SET SONARHOME=C:\sonarqube\sonarqube-5.6 + - cmd: SET PATH=C:\maven\apache-maven-3.2.5\bin;%JAVA_HOME%\bin;C:\sonar-scanner\sonar-scanner-2.6.1\bin;%PATH% + - cmd: SET SONARHOME=C:\sonarqube\sonarqube-5.6.1 - cmd: SET TestDataFolder=C:\projects\sonar-cxx\integration-tests\testdata - cmd: SET @@ -66,5 +66,5 @@ on_failure: - ps: Get-ChildItem cxx-checks\target\surefire-reports\*.txt | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name } - ps: Get-ChildItem sonar-cxx-plugin\target\surefire-reports\*.txt | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name } - ps: Get-ChildItem *.log | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name } - - ps: Get-ChildItem C:\sonarqube\sonarqube-5.6\logs\* | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name } + - ps: Get-ChildItem C:\sonarqube\sonarqube-5.6.1\logs\* | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name } \ No newline at end of file diff --git a/integration-tests/features/environment.py b/integration-tests/features/environment.py index ec2aabd1cc..ede0de9141 100644 --- a/integration-tests/features/environment.py +++ b/integration-tests/features/environment.py @@ -160,7 +160,7 @@ def start_sonar(sonarhome): sys.stdout.flush() now = time.time() start_script(sonarhome) - if not wait_for_sonar(120, is_webui_up): + if not wait_for_sonar(60, is_webui_up): sys.stdout.write(RED + "FAILED, duration: %03.1f s\n" % (time.time() - now) + RESET) return False diff --git a/integration-tests/features/importing_cppcheck_reports.feature b/integration-tests/features/importing_cppcheck_reports.feature index 1c6a834ebf..54dc9043a4 100644 --- a/integration-tests/features/importing_cppcheck_reports.feature +++ b/integration-tests/features/importing_cppcheck_reports.feature @@ -32,7 +32,7 @@ Feature: Importing Cppcheck reports AND the server log (if locatable) contains no error/warning messages BUT the analysis log contains a line matching """ - .*INFO.*The report '.*' seems to be empty, ignoring. + .*WARN.*The report '.*' seems to be empty, ignoring. """ AND the number of violations fed is 0 @@ -76,7 +76,7 @@ Feature: Importing Cppcheck reports AND the server log (if locatable) contains no error/warning messages BUT the analysis log contains a line matching """ - .*INFO.*Cannot find the file .* skipping violations + .*WARN.*Cannot find the file .* skipping violations """ AND the number of violations fed is 0