Skip to content

Commit 9250838

Browse files
SCANMAVEN-230 Update scanner library to support new bootstrapper and run 'its' in parallel (#244)
Co-authored-by: Leonardo Pilastri <leonardo.pilastri@sonarsource.com>
1 parent c955769 commit 9250838

File tree

48 files changed

+729
-715
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+729
-715
lines changed

.cirrus.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ build_task:
4949
folder: ${CIRRUS_WORKING_DIR}/.m2/repository
5050
script:
5151
- source cirrus-env BUILD
52+
- mvn -f property-dump-plugin/pom.xml -B install
5253
- regular_mvn_build_deploy_analyze
5354
cleanup_before_cache_script:
5455
- cleanup_maven_repository
@@ -72,7 +73,7 @@ mend_scan_task:
7273
mend_script:
7374
- source cirrus-env QA
7475
- source set_maven_build_version $BUILD_NUMBER
75-
- mvn clean install -DskipTests
76+
- mvn clean install -DskipTests -B
7677
- source ws_scan.sh
7778
cleanup_before_cache_script: cleanup_maven_repository
7879
allow_failures: "true"
@@ -86,7 +87,7 @@ qa_task:
8687
<<: *ONLY_SONARSOURCE_QA
8788
eks_container:
8889
<<: *CONTAINER_DEFINITION
89-
cpu: 2
90+
cpu: 6
9091
memory: 4G
9192
env:
9293
matrix:

cirrus/cirrus-qa.sh

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ mkdir -p $MAVEN_HOME_IT
1010
curl -sSL https://repo1.maven.org/maven2/org/apache/maven/apache-maven/$MAVEN_VERSION/apache-maven-$MAVEN_VERSION-bin.tar.gz | tar zx --strip-components 1 -C $MAVEN_HOME_IT
1111
cp -f ~/.m2/settings.xml $MAVEN_HOME_IT/conf/
1212

13+
# We need to build this small plugin first, that will dump the analysis properties in a local file
14+
mvn -f property-dump-plugin/pom.xml --batch-mode -Dmaven.home=$MAVEN_HOME_IT install
15+
1316
# Run ITs.
1417
cd its
1518
mvn -B -e -Dsonar.runtimeVersion=$SQ_VERSION -Dmaven.test.redirectTestOutputToFile=false -Dmaven.home=$MAVEN_HOME_IT verify

its/pom.xml

+13-7
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,6 @@
3838
<version>2.5.1</version>
3939
<scope>test</scope>
4040
</dependency>
41-
<dependency>
42-
<groupId>junit</groupId>
43-
<artifactId>junit</artifactId>
44-
<version>4.13.1</version>
45-
<scope>test</scope>
46-
</dependency>
4741
<dependency>
4842
<groupId>org.assertj</groupId>
4943
<artifactId>assertj-core</artifactId>
@@ -87,13 +81,25 @@
8781
<scope>provided</scope>
8882
</dependency>
8983
</dependencies>
90-
84+
9185
<build>
9286
<pluginManagement>
9387
<plugins>
9488
<plugin>
9589
<groupId>org.apache.maven.plugins</groupId>
9690
<artifactId>maven-surefire-plugin</artifactId>
91+
<version>3.5.1</version>
92+
<configuration>
93+
<properties>
94+
<configurationParameters>
95+
junit.jupiter.execution.parallel.enabled = true
96+
junit.jupiter.execution.parallel.mode.default = same_thread
97+
junit.jupiter.execution.parallel.mode.classes.default = concurrent
98+
junit.jupiter.testclass.order.default=org.junit.jupiter.api.ClassOrderer$ClassName
99+
junit.jupiter.testmethod.order.default=org.junit.jupiter.api.MethodOrderer$MethodName
100+
</configurationParameters>
101+
</properties>
102+
</configuration>
97103
</plugin>
98104
</plugins>
99105
</pluginManagement>

its/projects/maven/aggregator-inherit-parent-and-bind-to-verify/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<version>1.0-SNAPSHOT</version>
88
<relativePath>parent/pom.xml</relativePath>
99
</parent>
10-
<artifactId>aggregator</artifactId>
10+
<artifactId>aggregator-inherit-parent</artifactId>
1111
<version>1.0-SNAPSHOT</version>
1212
<packaging>pom</packaging>
1313

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<groupId>org.sonarsource.maven.its</groupId>
5+
<artifactId>bootstrap-small-project</artifactId>
6+
<version>1.0-SNAPSHOT</version>
7+
8+
<properties>
9+
<maven.compiler.source>11</maven.compiler.source>
10+
<maven.compiler.target>11</maven.compiler.target>
11+
</properties>
12+
13+
</project>

its/projects/project-default-config/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
<artifactId>maven-compiler-plugin</artifactId>
2222
<version>3.3</version>
2323
<configuration>
24-
<source>1.7</source>
25-
<target>1.7</target>
24+
<source>1.8</source>
25+
<target>1.8</target>
2626
</configuration>
2727
</plugin>
2828
</plugins>

its/projects/version/compilerPluginConfig/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<artifactId>maven-compiler-plugin</artifactId>
2424
<version>3.3</version>
2525
<configuration>
26-
<source>1.7</source>
26+
<source>1.8</source>
2727
<target>1.8</target>
2828
</configuration>
2929
</plugin>

its/projects/version/properties/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<name>Sonar :: Integration Tests :: Java Version</name>
77

88
<properties>
9-
<maven.compiler.source>1.7</maven.compiler.source>
9+
<maven.compiler.source>1.8</maven.compiler.source>
1010
<maven.compiler.target>1.8</maven.compiler.target>
1111
</properties>
1212

0 commit comments

Comments
 (0)