@@ -53,6 +53,7 @@ public class JUnitParser extends TestResultParser {
5353 private static final Logger LOGGER = Logger .getLogger (JUnitParser .class .getName ());
5454
5555 private final boolean keepLongStdio ;
56+ private final boolean keepProperties ;
5657 private final boolean allowEmptyResults ;
5758
5859 private final boolean skipOldReports ;
@@ -69,7 +70,7 @@ public JUnitParser() {
6970 */
7071 @ Deprecated
7172 public JUnitParser (boolean keepLongStdio ) {
72- this (keepLongStdio , false , false );
73+ this (keepLongStdio , false , false , false );
7374 }
7475
7576 /**
@@ -79,11 +80,12 @@ public JUnitParser(boolean keepLongStdio) {
7980 */
8081 @ Deprecated
8182 public JUnitParser (boolean keepLongStdio , boolean allowEmptyResults ) {
82- this (keepLongStdio , allowEmptyResults , false );
83+ this (keepLongStdio , false , allowEmptyResults , false );
8384 }
8485
85- public JUnitParser (boolean keepLongStdio , boolean allowEmptyResults , boolean skipOldReports ) {
86+ public JUnitParser (boolean keepLongStdio , boolean keepProperties , boolean allowEmptyResults , boolean skipOldReports ) {
8687 this .keepLongStdio = keepLongStdio ;
88+ this .keepProperties = keepProperties ;
8789 this .allowEmptyResults = allowEmptyResults ;
8890 this .skipOldReports = skipOldReports ;
8991 }
@@ -115,14 +117,14 @@ public TestResult parseResult(String testResultLocations, Run<?,?> build, FilePa
115117 public TestResult parseResult (String testResultLocations , Run <?,?> build , PipelineTestDetails pipelineTestDetails ,
116118 FilePath workspace , Launcher launcher , TaskListener listener )
117119 throws InterruptedException , IOException {
118- return workspace .act (new DirectParseResultCallable (testResultLocations , build , keepLongStdio , allowEmptyResults ,
120+ return workspace .act (new DirectParseResultCallable (testResultLocations , build , keepLongStdio , keepProperties , allowEmptyResults ,
119121 pipelineTestDetails , listener , skipOldReports ));
120122 }
121123
122124 public TestResultSummary summarizeResult (String testResultLocations , Run <?,?> build , PipelineTestDetails pipelineTestDetails ,
123125 FilePath workspace , Launcher launcher , TaskListener listener , JunitTestResultStorage storage )
124126 throws InterruptedException , IOException {
125- return workspace .act (new StorageParseResultCallable (testResultLocations , build , keepLongStdio , allowEmptyResults ,
127+ return workspace .act (new StorageParseResultCallable (testResultLocations , build , keepLongStdio , keepProperties , allowEmptyResults ,
126128 pipelineTestDetails , listener , storage .createRemotePublisher (build ), skipOldReports ));
127129 }
128130
@@ -136,21 +138,23 @@ private static abstract class ParseResultCallable<T> extends MasterToSlaveFileCa
136138 private final String testResults ;
137139 private final long nowMaster ;
138140 private final boolean keepLongStdio ;
141+ private final boolean keepProperties ;
139142 private final boolean allowEmptyResults ;
140143 private final PipelineTestDetails pipelineTestDetails ;
141144 private final TaskListener listener ;
142145
143146 private boolean skipOldReports ;
144147
145148 private ParseResultCallable (String testResults , Run <?,?> build ,
146- boolean keepLongStdio , boolean allowEmptyResults ,
149+ boolean keepLongStdio , boolean keepProperties , boolean allowEmptyResults ,
147150 PipelineTestDetails pipelineTestDetails , TaskListener listener ,
148151 boolean skipOldReports ) {
149152 this .buildStartTimeInMillis = build .getStartTimeInMillis ();
150153 this .buildTimeInMillis = build .getTimeInMillis ();
151154 this .testResults = testResults ;
152155 this .nowMaster = System .currentTimeMillis ();
153156 this .keepLongStdio = keepLongStdio ;
157+ this .keepProperties = keepProperties ;
154158 this .allowEmptyResults = allowEmptyResults ;
155159 this .pipelineTestDetails = pipelineTestDetails ;
156160 this .listener = listener ;
@@ -173,7 +177,7 @@ public T invoke(File ws, VirtualChannel channel) throws IOException {
173177 + ",buildTimeInMillis:" + buildTimeInMillis + ",filesTimestamp:" + filesTimestamp + ",nowSlave:"
174178 + nowSlave + ",nowMaster:" + nowMaster );
175179 }
176- result = new TestResult (filesTimestamp , ds , keepLongStdio , pipelineTestDetails , skipOldReports );
180+ result = new TestResult (filesTimestamp , ds , keepLongStdio , keepProperties , pipelineTestDetails , skipOldReports );
177181 result .tally ();
178182 } else {
179183 if (this .allowEmptyResults ) {
@@ -193,9 +197,9 @@ public T invoke(File ws, VirtualChannel channel) throws IOException {
193197
194198 private static final class DirectParseResultCallable extends ParseResultCallable <TestResult > {
195199
196- DirectParseResultCallable (String testResults , Run <?,?> build , boolean keepLongStdio , boolean allowEmptyResults ,
200+ DirectParseResultCallable (String testResults , Run <?,?> build , boolean keepLongStdio , boolean keepProperties , boolean allowEmptyResults ,
197201 PipelineTestDetails pipelineTestDetails , TaskListener listener , boolean skipOldReports ) {
198- super (testResults , build , keepLongStdio , allowEmptyResults , pipelineTestDetails , listener , skipOldReports );
202+ super (testResults , build , keepLongStdio , keepProperties , allowEmptyResults , pipelineTestDetails , listener , skipOldReports );
199203 }
200204
201205 @ Override
@@ -209,9 +213,9 @@ private static final class StorageParseResultCallable extends ParseResultCallabl
209213
210214 private final RemotePublisher publisher ;
211215
212- StorageParseResultCallable (String testResults , Run <?,?> build , boolean keepLongStdio , boolean allowEmptyResults ,
216+ StorageParseResultCallable (String testResults , Run <?,?> build , boolean keepLongStdio , boolean keepProperties , boolean allowEmptyResults ,
213217 PipelineTestDetails pipelineTestDetails , TaskListener listener , RemotePublisher publisher , boolean skipOldReports ) {
214- super (testResults , build , keepLongStdio , allowEmptyResults , pipelineTestDetails , listener , skipOldReports );
218+ super (testResults , build , keepLongStdio , keepProperties , allowEmptyResults , pipelineTestDetails , listener , skipOldReports );
215219 this .publisher = publisher ;
216220 }
217221
0 commit comments