This repository was archived by the owner on Jan 10, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -126,17 +126,25 @@ public void Add (Assembly assembly, IList<string> fixtures)
126126 }
127127 }
128128
129+ protected void FlushConsole ( )
130+ {
131+ Console . Out . Flush ( ) ;
132+ Console . Error . Flush ( ) ;
133+ }
134+
129135 [ DllImport ( "libc" ) ]
130136 static extern void exit ( int code ) ;
131137 protected virtual void TerminateWithSuccess ( )
132138 {
133139 // For WatchOS we're terminating the extension, not the watchos app itself.
134140 Console . WriteLine ( "Exiting test run with success" ) ;
141+ FlushConsole ( ) ;
135142 exit ( 0 ) ;
136143 }
137144
138145 protected virtual void TerminateWithExitCode ( int exitCode )
139146 {
147+ FlushConsole ( ) ;
140148 if ( exitCode == 0 ) {
141149 TerminateWithSuccess ( ) ;
142150 } else {
@@ -737,6 +745,7 @@ public UINavigationController NavigationController {
737745 protected override void TerminateWithSuccess ( )
738746 {
739747 Console . WriteLine ( $ "Exiting test run with success") ;
748+ FlushConsole ( ) ;
740749 Selector selector = new Selector ( "terminateWithSuccess" ) ;
741750 UIApplication . SharedApplication . PerformSelector ( selector , UIApplication . SharedApplication , 0 ) ;
742751 }
You can’t perform that action at this time.
0 commit comments