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-1934] Ability to disable system-out/system-err for successfuly passed tests. #670
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -679,6 +679,16 @@ public abstract class AbstractSurefireMojo extends AbstractMojo implements Suref | |
@Parameter(property = "enableAssertions", defaultValue = "true") | ||
private boolean enableAssertions; | ||
|
||
/** | ||
* Flag for including/excluding system-out and system-err elements in xml reports. | ||
* <br> | ||
* True by default. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These two lines are redundant, Plugin Tools will take care of that. |
||
* | ||
* @since 3.0.0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be 3.2.4 |
||
*/ | ||
@Parameter(property = "enableOutputElements", defaultValue = "true") | ||
private boolean enableOutputElements; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please rename to |
||
|
||
/** | ||
* The current build session instance. | ||
*/ | ||
|
@@ -1476,6 +1486,9 @@ private void convertJunitCoreParameters() throws MojoExecutionException { | |
Double.toString(getParallelTestsTimeoutForcedInSeconds())); | ||
getProperties() | ||
.setProperty(ProviderParameterNames.PARALLEL_OPTIMIZE_PROP, Boolean.toString(isParallelOptimized())); | ||
getProperties() | ||
.setProperty( | ||
ProviderParameterNames.ENABLE_OUTPUT_ELEMENTS_PROP, Boolean.toString(isEnableOutputElements())); | ||
|
||
String message = "parallel='" + usedParallel + '\'' | ||
+ ", perCoreThreadCount=" + getPerCoreThreadCount() | ||
|
@@ -1484,7 +1497,8 @@ private void convertJunitCoreParameters() throws MojoExecutionException { | |
+ ", threadCountSuites=" + getThreadCountSuites() | ||
+ ", threadCountClasses=" + getThreadCountClasses() | ||
+ ", threadCountMethods=" + getThreadCountMethods() | ||
+ ", parallelOptimized=" + isParallelOptimized(); | ||
+ ", parallelOptimized=" + isParallelOptimized() | ||
+ ", enableOutputElements=" + isEnableOutputElements(); | ||
|
||
logDebugOrCliShowErrors(message); | ||
} | ||
|
@@ -1978,6 +1992,7 @@ private StartupReportConfiguration getStartupReportConfiguration(String configCh | |
getReportSchemaLocation(), | ||
getEncoding(), | ||
isForking, | ||
isEnableOutputElements(), | ||
xmlReporter, | ||
outReporter, | ||
testsetReporter); | ||
|
@@ -2518,6 +2533,7 @@ private String getConfigChecksum() { | |
checksum.add(getTempDir()); | ||
checksum.add(useModulePath()); | ||
checksum.add(getEnableProcessChecker()); | ||
checksum.add(isEnableOutputElements()); | ||
addPluginSpecificChecksumItems(checksum); | ||
return checksum.getSha1(); | ||
} | ||
|
@@ -3474,6 +3490,15 @@ public void setEnableAssertions(boolean enableAssertions) { | |
this.enableAssertions = enableAssertions; | ||
} | ||
|
||
public boolean isEnableOutputElements() { | ||
return enableOutputElements; | ||
} | ||
|
||
@SuppressWarnings("UnusedDeclaration") | ||
public void setEnableOutputElements(boolean enableOutputElements) { | ||
this.enableOutputElements = enableOutputElements; | ||
} | ||
|
||
public MavenSession getSession() { | ||
return session; | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -82,6 +82,7 @@ public void setup() { | |
null, | ||
null, | ||
false, | ||
true, | ||
xmlReporter, | ||
consoleOutputReporter, | ||
infoReporter); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
XML