This repository was archived by the owner on Jul 29, 2024. It is now read-only.
File tree 1 file changed +11
-1
lines changed
1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -93,11 +93,13 @@ var init = function(configFile, additionalConfig) {
93
93
} ) ;
94
94
95
95
this . process . on ( 'error' , function ( err ) {
96
+ self . reporter . flush ( ) ;
96
97
log_ ( 'Runner Process(' + self . process . pid + ') Error: ' + err ) ;
97
98
launcherExitCode = 1 ;
98
99
} ) ;
99
100
100
101
this . process . on ( 'exit' , function ( code ) {
102
+ self . reporter . flush ( ) ;
101
103
if ( code ) {
102
104
log_ ( 'Runner Process Exited With Error Code: ' + code ) ;
103
105
launcherExitCode = 1 ;
@@ -224,7 +226,7 @@ var TaskReporter_ = function(task, pid) {
224
226
TaskReporter_ . prototype . reportHeader_ = function ( ) {
225
227
var capability = this . task . capability ;
226
228
var eol = require ( 'os' ) . EOL ;
227
- var output = '------------------------------------' + eol ;
229
+ var output = eol + '------------------------------------' + eol ;
228
230
output += 'PID: ' + this . pid + ' (capability: ' ;
229
231
output += ( capability . browserName ) ?
230
232
capability . browserName : '' ;
@@ -267,9 +269,17 @@ TaskReporter_.prototype.logStderr = function(stderr) {
267
269
*/
268
270
TaskReporter_ . prototype . testsDone = function ( failedCount ) {
269
271
this . failedCount = failedCount ;
272
+ this . flush ( ) ;
273
+ } ;
274
+
275
+ /**
276
+ * Flushes the buffer to stdout.
277
+ */
278
+ TaskReporter_ . prototype . flush = function ( failedCount ) {
270
279
if ( this . buffer ) {
271
280
// Flush buffer if nonempty
272
281
process . stdout . write ( this . buffer ) ;
282
+ this . buffer = '' ;
273
283
}
274
284
} ;
275
285
You can’t perform that action at this time.
0 commit comments