Skip to content

Commit fbb442e

Browse files
authored
Merge pull request SonarOpenCommunity#1635 from guwirth/test-sq7.5
test with SQ 7.5
2 parents 0955cff + b4ae339 commit fbb442e

10 files changed

+56
-13
lines changed

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ env:
1313
- SONARHOME=/tmp/sonarqube-7.2 SONARAPI=SqApi67
1414
- SONARHOME=/tmp/sonarqube-7.3 SONARAPI=SqApi67
1515
- SONARHOME=/tmp/sonarqube-7.4 SONARAPI=SqApi67
16+
- SONARHOME=/tmp/sonarqube-7.5 SONARAPI=SqApi75
1617

1718
matrix:
1819
fast_finish: true
@@ -56,6 +57,8 @@ install:
5657
- unzip -qq sonarqube-7.3.zip
5758
- travis_retry wget -q https://binaries.sonarsource.com/Distribution/sonarqube/sonarqube-7.4.zip
5859
- unzip -qq sonarqube-7.4.zip
60+
- travis_retry wget -q https://binaries.sonarsource.com/Distribution/sonarqube/sonarqube-7.5.zip
61+
- unzip -qq sonarqube-7.5.zip
5962
- travis_retry wget -q https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-3.2.0.1227.zip
6063
- unzip -qq sonar-scanner-cli-3.2.0.1227.zip
6164
- travis_retry wget -q https://github.com/htacg/tidy-html5/archive/5.6.0.zip --output-document=tidy-html5.zip

integration-tests/features/importing_clangsa_reports.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@SqApi67
1+
@SqApi67 @SqApi75
22
Feature: Importing Clang Static Analyzer reports
33
As a SonarQube user,
44
I want to import the Clang Static Analyzer reports into SonarQube.

integration-tests/features/importing_clangsa_scanbuild_reports.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@SqApi67
1+
@SqApi67 @SqApi75
22
Feature: Importing Clang Static Analyzer scan-build reports
33

44
As a SonarQube user,

integration-tests/features/importing_coverage.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Feature: Importing coverage data
33
I want to import my coverage metric values into SonarQube
44
In order to be able to use relevant SonarQube features
55

6-
@SqApi67
6+
@SqApi67 @SqApi75
77
Scenario: Importing coverage reports
88
Given the project "coverage_project"
99
When I run sonar-scanner with following options:
@@ -23,7 +23,7 @@ Feature: Importing coverage data
2323
| line_coverage | 25.0 |
2424
| branch_coverage | 50 |
2525

26-
@SqApi67
26+
@SqApi67 @SqApi75
2727
Scenario: Zero coverage measures without coverage reports
2828
If we don't pass coverage reports all coverage measures, except the branch
2929
ones, should be 'zero'. The branch coverage measures remain 'None'

integration-tests/features/importing_cppcheck_reports.feature

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Feature: Importing Cppcheck reports
44
In order to have all static code checking results in one place,
55
work with them, filter them etc. and derive metrics from them.
66

7-
@SqApi67
7+
@SqApi67 @SqApi75
88
Scenario: The reports are missing
99
Given the project "cppcheck_project"
1010
When I run "sonar-scanner -X -Dsonar.cxx.cppcheck.reportPath=empty.xml"
@@ -30,7 +30,7 @@ Feature: Importing Cppcheck reports
3030
"""
3131
And the number of violations fed is 0
3232

33-
@SqApi67
33+
@SqApi67 @SqApi75
3434
Scenario: The reports use paths relative to directories listed in sonar.sources
3535
Given the project "cppcheck_project"
3636
When I run "sonar-scanner -X -Dsonar.cxx.cppcheck.reportPath=relative-to-src.xml"
@@ -43,7 +43,7 @@ Feature: Importing Cppcheck reports
4343
"""
4444
And the number of violations fed is 0
4545

46-
@SqApi67
46+
@SqApi67 @SqApi75
4747
Scenario: The reports and issues in the reports have absolute paths
4848
Given the project "cppcheck_with_absolute_paths_project"
4949
And platform is not "Windows"
@@ -53,7 +53,7 @@ Feature: Importing Cppcheck reports
5353
And the server log (if locatable) contains no error/warning messages
5454
And the number of violations fed is 6
5555

56-
@SqApi67
56+
@SqApi67 @SqApi75
5757
Scenario Outline: The reports are invalid
5858
Given the project "cppcheck_project"
5959
When I run "sonar-scanner -X -Dsonar.cxx.cppcheck.reportPath=<reportpath>"
@@ -70,7 +70,7 @@ Feature: Importing Cppcheck reports
7070
| unparsable.xml | 0 |
7171
| wrongly_encoded.xml | 0 |
7272

73-
@SqApi67
73+
@SqApi67 @SqApi75
7474
Scenario Outline: Importing Cppcheck reports
7575
Given the project "cppcheck_project"
7676
When I run "sonar-scanner -X -Dsonar.cxx.cppcheck.reportPath=<reportpath>"

integration-tests/features/multimodule_analysis.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@SqApi67
1+
@SqApi67 @SqApi75
22
Feature: cpp-multimodule-project
33
Test multimodule project with reports at root of the project
44

integration-tests/features/smoketest.feature

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,43 @@ Feature: Smoketest
4242
| test_failures | 2 |
4343
| test_errors | 0 |
4444
| tests | 4 |
45+
46+
@SqApi75
47+
Scenario: Smoketest
48+
Given the project "smoketest_project"
49+
When I run "sonar-scanner -X"
50+
Then the analysis finishes successfully
51+
And the analysis in server has completed
52+
And the analysis log contains no error/warning messages except those matching:
53+
"""
54+
.*WARN.*Unable to get a valid mac address, will use a dummy address
55+
.*WARN.*cannot find the sources for '#include <gtest/gtest\.h>'
56+
.*WARN.*cannot find the sources for '#include <iostream>'
57+
.*WARN.*Cannot find the file '.*component_XXX.cc', skipping violations
58+
.*WARN.*Cannot find a report for '.*'
59+
.*WARN.*Already created edge from 'src/cli/main.cc'.*
60+
"""
61+
And the following metrics have following values:
62+
| metric | value |
63+
| ncloc | 56 |
64+
| lines | 151 |
65+
| statements | 36 |
66+
| classes | 1 |
67+
| files | 8 |
68+
| directories | 4 |
69+
| functions | 5 |
70+
| comment_lines_density | 30 |
71+
| comment_lines | 24 |
72+
| duplicated_lines_density | 45.7 |
73+
| duplicated_lines | 84 |
74+
| duplicated_blocks | 2 |
75+
| duplicated_files | 2 |
76+
| complexity | 7 |
77+
| file_complexity | 0.9 |
78+
| violations | 12 |
79+
| coverage | 53.8 |
80+
| line_coverage | 54.8 |
81+
| branch_coverage | 50 |
82+
| test_failures | 2 |
83+
| test_errors | 0 |
84+
| tests | 4 |

integration-tests/features/test_create_rules_and_bullseye_import.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@SqApi67
1+
@SqApi67 @SqApi75
22
Feature: GoogleTestWithBullseyeAndVsProject
33
This test verifies that analysis is able to import bullseye coverage reports and import custom rules reports.
44
Custom rules are created using Rest API, after test ends rules are deleted.

integration-tests/features/test_execution_statistics.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@SqApi67
1+
@SqApi67 @SqApi75
22
Feature: Providing test execution numbers
33
As a SonarQube user,
44
I want to import the test execution reports into SonarQube

integration-tests/features/x_importing_cppcheck_reports_c_cpp.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@SqApi67
1+
@SqApi67 @SqApi75
22
Feature: Importing Cppcheck ANSI-C reports
33

44
Scenario Outline: Importing cppcheck issues when c language issues are in report.

0 commit comments

Comments
 (0)