diff options
author | Godin <mandrikov@gmail.com> | 2010-12-13 22:47:43 +0000 |
---|---|---|
committer | Godin <mandrikov@gmail.com> | 2010-12-13 22:47:43 +0000 |
commit | 7b06a8b620df7137fa8629f86d35628b1f4c76af (patch) | |
tree | b62dedd9251b1c4f2bfcfce01bab796a67573447 /tests | |
parent | 6662f3b868d927eb838202b5fcc1e8150dff346f (diff) | |
download | sonarqube-7b06a8b620df7137fa8629f86d35628b1f4c76af.tar.gz sonarqube-7b06a8b620df7137fa8629f86d35628b1f4c76af.zip |
Separate profile for violations-timemachine IT
Diffstat (limited to 'tests')
7 files changed, 35 insertions, 10 deletions
diff --git a/tests/integration/tests/build.xml b/tests/integration/tests/build.xml index 9edf580f6c6..75bad16d20f 100644 --- a/tests/integration/tests/build.xml +++ b/tests/integration/tests/build.xml @@ -113,12 +113,10 @@ <target name="violations-timemachine"> <mvn args="clean install -DskiptTests" dir="${projects.dir}/violations-timemachine/v1"/> <mvnsonar failonerror="false" - args="-Dsonar.projectDate=2010-10-19" pom="${projects.dir}/violations-timemachine/v1/pom.xml"/> <mvn args="clean install -DskiptTests" dir="${projects.dir}/violations-timemachine/v2"/> <mvnsonar failonerror="false" - args="-Dsonar.projectDate=2010-11-13" pom="${projects.dir}/violations-timemachine/v2/pom.xml"/> </target> diff --git a/tests/integration/tests/custom-projects/violations-timemachine/v1/pom.xml b/tests/integration/tests/custom-projects/violations-timemachine/v1/pom.xml index 6362642d2a1..3d8995b11f3 100644 --- a/tests/integration/tests/custom-projects/violations-timemachine/v1/pom.xml +++ b/tests/integration/tests/custom-projects/violations-timemachine/v1/pom.xml @@ -18,4 +18,9 @@ </plugin> </plugins> </build> + + <properties> + <sonar.profile>violations-timemachine</sonar.profile> + <sonar.projectDate>2010-10-19</sonar.projectDate> + </properties> </project> diff --git a/tests/integration/tests/custom-projects/violations-timemachine/v2/pom.xml b/tests/integration/tests/custom-projects/violations-timemachine/v2/pom.xml index 6362642d2a1..d61f9471aae 100644 --- a/tests/integration/tests/custom-projects/violations-timemachine/v2/pom.xml +++ b/tests/integration/tests/custom-projects/violations-timemachine/v2/pom.xml @@ -18,4 +18,9 @@ </plugin> </plugins> </build> + + <properties> + <sonar.profile>violations-timemachine</sonar.profile> + <sonar.projectDate>2010-11-13</sonar.projectDate> + </properties> </project> diff --git a/tests/integration/tests/custom-projects/violations-timemachine/v2/src/main/java/org/sonar/tests/violationstimemachine/FileAddedInV2.java b/tests/integration/tests/custom-projects/violations-timemachine/v2/src/main/java/org/sonar/tests/violationstimemachine/FileAddedInV2.java index 51636a431da..0d6026331ab 100644 --- a/tests/integration/tests/custom-projects/violations-timemachine/v2/src/main/java/org/sonar/tests/violationstimemachine/FileAddedInV2.java +++ b/tests/integration/tests/custom-projects/violations-timemachine/v2/src/main/java/org/sonar/tests/violationstimemachine/FileAddedInV2.java @@ -2,7 +2,7 @@ package org.sonar.tests.violationstimemachine; public class FileAddedInV2 { - protected void methodOne() { + protected void methodOne() { // design for extension int i = 0; // unused local variable i++; } diff --git a/tests/integration/tests/custom-projects/violations-timemachine/v2/src/main/java/org/sonar/tests/violationstimemachine/Hello.java b/tests/integration/tests/custom-projects/violations-timemachine/v2/src/main/java/org/sonar/tests/violationstimemachine/Hello.java index 473f9b07773..c3c8e1c8bcb 100644 --- a/tests/integration/tests/custom-projects/violations-timemachine/v2/src/main/java/org/sonar/tests/violationstimemachine/Hello.java +++ b/tests/integration/tests/custom-projects/violations-timemachine/v2/src/main/java/org/sonar/tests/violationstimemachine/Hello.java @@ -4,12 +4,12 @@ public class Hello { // We need two similar violations here to check that they would be associated correctly - protected void methodOne() { + protected void methodOne() { // design for extension int i = 0; // unused local variable i++; } - protected void methodTwo() { + protected void methodTwo() { // design for extension int i = 0; // unused local variable i++; } diff --git a/tests/integration/tests/src/it/integration-tests-backup.xml b/tests/integration/tests/src/it/integration-tests-backup.xml index 6bfa7e97a41..075015591cd 100644 --- a/tests/integration/tests/src/it/integration-tests-backup.xml +++ b/tests/integration/tests/src/it/integration-tests-backup.xml @@ -2002,5 +2002,23 @@ </active-rules> <alerts/> </profile> + <profile> + <name><![CDATA[violations-timemachine]]></name> + <default-profile><![CDATA[false]]></default-profile> + <provided><![CDATA[false]]></provided> + <language><![CDATA[java]]></language> + <active-rules> + <active-rule> + <key><![CDATA[UnusedLocalVariable]]></key> + <plugin><![CDATA[pmd]]></plugin> + <level><![CDATA[MAJOR]]></level> + </active-rule> + <active-rule> + <key><![CDATA[com.puppycrawl.tools.checkstyle.checks.design.DesignForExtensionCheck]]></key> + <plugin><![CDATA[checkstyle]]></plugin> + <level><![CDATA[MINOR]]></level> + </active-rule> + </active-rules> + </profile> </profiles> </sonar-config> diff --git a/tests/integration/tests/src/it/selenium/timemachine/violations-timemachine.html b/tests/integration/tests/src/it/selenium/timemachine/violations-timemachine.html index 332cadb01d5..ecf1c1362c3 100644 --- a/tests/integration/tests/src/it/selenium/timemachine/violations-timemachine.html +++ b/tests/integration/tests/src/it/selenium/timemachine/violations-timemachine.html @@ -18,13 +18,13 @@ </tr> <tr> <td>assertTextPresent</td> - <td>profile Integration tests</td> + <td>Profile violations-timemachine</td> <td></td> </tr> <tr> <td>assertText</td> <td>m_violations</td> - <td>8</td> + <td>7</td> </tr> <tr> <td>assertText</td> @@ -39,7 +39,7 @@ <tr> <td>assertText</td> <td>m_minor_violations</td> - <td>0</td> + <td>3</td> </tr> <tr> <td>assertText</td> @@ -49,9 +49,8 @@ <tr> <td>assertText</td> <td>m_info_violations</td> - <td>4</td> + <td>0</td> </tr> - </tbody></table> </body> </html> |