This is the mail archive of the mauve-patches@sourceware.org mailing list for the Mauve project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

FYI: Make Harness sleep a little


Hi,

Currently the Harness is doing a busy wait for its child TestRunner
process to produce some output. This is not so nice. I already discussed
this with Tony and he is working on a real solution. But for now I think
it is appropriate to have a little quickfix workaround to get the
testsuite to run a little (actually twice on my machine) faster.

2006-06-24  Mark Wielaard  <mark@klomp.org>

        * Harness.java (getBootClassPath): Add Thread.sleep().
        (runTest): Likewise.

This should also reduce the time needed to run mauve on builder
significantly.

Committed,

Mark
Index: Harness.java
===================================================================
RCS file: /cvs/mauve/mauve/Harness.java,v
retrieving revision 1.14
diff -u -r1.14 Harness.java
--- Harness.java	22 Jun 2006 20:15:44 -0000	1.14
+++ Harness.java	24 Jun 2006 17:31:16 -0000
@@ -518,6 +518,18 @@
               else
                 System.out.println(bcpOutput);
             }
+	  else
+	    {
+	      // FIXME - Quickworkaround for busy-waiting, needs proper FIX.
+	      try
+	        {
+		  Thread.sleep(100);
+		}
+	      catch (InterruptedException ie)
+	        {
+		  // ignore
+		}
+	    }
         }
     }
     catch (IOException ioe)
@@ -858,8 +870,21 @@
             }
           else
             {
-              System.err.print(sb.toString());
-              sb = new StringBuffer();
+	      if (sb.length() != 0)
+	        {
+                  System.err.print(sb.toString());
+                  sb = new StringBuffer();
+		}
+
+              // FIXME - Quickworkaround for busy-waiting, needs proper FIX.
+              try
+                {
+                  Thread.sleep(100);
+                }
+              catch (InterruptedException ie)
+                {
+                  // ignore
+                }
             }
         }
         catch (IOException e)

Attachment: signature.asc
Description: This is a digitally signed message part


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]