Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SUREFIRE-2225] Surefire ITs fail when project directory contains space #705

Merged
merged 1 commit into from
Dec 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[SUREFIRE-2225] Surefire ITs fail when project directory contains space
This closes #705
  • Loading branch information
michael-o committed Dec 30, 2023
commit 4eb0fd5aec588c6fc83705561cceadc64afec7f7
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ private List<String> getInitialGoals() {
goals.add("-Dsurefire.version=" + surefireVersion);

String jacocoAgent = System.getProperty("jacoco.agent", "");
// Remove unnecessary backslash escaping for Windows, see https://github.com/jacoco/jacoco/issues/1559
jacocoAgent = jacocoAgent.replace("\\\\", "\\");
// Remove quotes which will cause a syntax error raised by cmd.exe because of quote escaping
jacocoAgent = jacocoAgent.replace("\"", "");
goals.add("-Djacoco.agent=" + jacocoAgent);
goals.add("-nsu");

Expand Down
2 changes: 1 addition & 1 deletion surefire-its/src/test/resources/junit47-parallel/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>${argLine} ${jacoco.agent}</argLine>
<argLine>${argLine} "${jacoco.agent}"</argLine>
</configuration>
</plugin>
</plugins>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire.version}</version>
<configuration>
<argLine>${argLine} ${jacoco.agent}</argLine>
<argLine>${argLine} "${jacoco.agent}"</argLine>
<parallel>methods</parallel>
<properties>
<property>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire.version}</version>
<configuration>
<argLine>${argLine} ${jacoco.agent}</argLine>
<argLine>${argLine} "${jacoco.agent}"</argLine>
<parallel>methods</parallel>
<threadCount>10</threadCount>
<properties>
Expand Down
2 changes: 1 addition & 1 deletion surefire-its/src/test/resources/testng-simple/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire.version}</version>
<configuration>
<argLine>${argLine} ${jacoco.agent}</argLine>
<argLine>${argLine} "${jacoco.agent}"</argLine>
<runOrder>reversealphabetical</runOrder>
<properties>
<property>
Expand Down
Loading