public inbox for mauve-patches@sourceware.org
 help / color / mirror / Atom feed
From: Gary Benson <gbenson@redhat.com>
To: mauve-patches@sources.redhat.com
Subject: Re: new Harness with compilation capabilities
Date: Tue, 25 Apr 2006 12:21:00 -0000	[thread overview]
Message-ID: <20060425122051.GA5167@redhat.com> (raw)
In-Reply-To: <1145910191.9046.19.camel@tony.toronto.redhat.com>

[-- Attachment #1: Type: text/plain, Size: 832 bytes --]

Anthony Balkissoon wrote:
> This new version of the Harness has auto-compilation capabilities
> and also fixes a lot of bugs and performance issues that were
> present in the last one.

This looks really nice, but I can't get it to run.  I've applied the
attached patch to make it build with 1.4 and I'm doing:

  ./configure --enable-auto-compile \
      --with-classpath-install-dir=/home/users/gary/work/classpath/install \
      --with-vm=jamvm

I then do:

  CLASSPATH=`pwd` make

(For some reason it doesn't find config.java without the extra bit).
When I go to run some tests ecj is being invoked with -bootclasspath
/home/users/gary/work/classpath/install/share/classpath and that
directory contains the following:

  examples/  glibj.zip  README  tools/  tools.zip

Am I building Classpath in some wierd way?

Cheers,
Gary

[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 3623 bytes --]

Index: Harness.java
===================================================================
RCS file: /cvs/mauve/mauve/Harness.java,v
retrieving revision 1.2
diff -u -r1.2 Harness.java
--- Harness.java	24 Apr 2006 19:42:02 -0000	1.2
+++ Harness.java	25 Apr 2006 12:12:02 -0000
@@ -28,6 +28,7 @@
 import java.io.BufferedReader;
 import java.io.File;
 import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
 import java.io.FileReader;
 import java.io.IOException;
 import java.io.InputStreamReader;
@@ -384,8 +385,8 @@
       klass.getMethod
       ("compile", new Class[] 
           { String.class, PrintWriter.class, PrintWriter.class });    
-    ecjWriterOut = new PrintWriter(".ecjOut");
-    ecjWriterErr = new PrintWriter(".ecjErr");
+    ecjWriterOut = new PrintWriter(new FileOutputStream(".ecjOut"));
+    ecjWriterErr = new PrintWriter(new FileOutputStream(".ecjErr"));
     
     
     // Set up the compiler options now that we know whether or not we are
@@ -553,7 +554,7 @@
    */
   private static void initProcess(String[] args)
   {    
-    StringBuilder sb = new StringBuilder(" RunnerProcess");
+    StringBuffer sb = new StringBuffer(" RunnerProcess");
     for (int i = 0; i < args.length; i++)      
       sb.append(" " + args[i]);      
     sb.insert(0, vmCommand);
@@ -836,7 +837,7 @@
     File dir = new File(folderName);
     String dirPath = dir.getPath();    
     File[] files = dir.listFiles();
-    StringBuilder sb = new StringBuilder();
+    StringBuffer sb = new StringBuffer();
     String fullPath = null;
     boolean compilepassed = true;
     
@@ -888,7 +889,7 @@
     runFolder(sb, compilepassed);
   }
   
-  private static boolean compileFolder(StringBuilder sb, String folderName)
+  private static boolean compileFolder(StringBuffer sb, String folderName)
   {
     int result = - 1;
     int compileFailsInFolder = 0;
@@ -1024,7 +1025,7 @@
    * @param compilepassed true if the compilation step happened and all 
    * tests passed or if compilation didn't happen (because of -nocompile).
    */
-  private static void runFolder(StringBuilder sb, boolean compilepassed)
+  private static void runFolder(StringBuffer sb, boolean compilepassed)
   {
     StringTokenizer st = new StringTokenizer(sb.toString());
     String nextTest = null;
Index: RunnerProcess.java
===================================================================
RCS file: /cvs/mauve/mauve/RunnerProcess.java,v
retrieving revision 1.2
diff -u -r1.2 RunnerProcess.java
--- RunnerProcess.java	24 Apr 2006 19:42:02 -0000	1.2
+++ RunnerProcess.java	25 Apr 2006 12:12:03 -0000
@@ -215,7 +215,7 @@
           // we have to check through the file.
           while (firstLine != null)
             {
-              if (firstLine.contains("not-a-test"))
+              if (firstLine.indexOf("not-a-test") != -1)
                   {
                     description = NOT_A_TEST_DESCRIPTION;
                     return;
@@ -691,10 +691,10 @@
       }
     
     // sb holds all the information we wish to return.
-    StringBuilder sb = 
-      new StringBuilder("  " + (verbose ? "FAIL: " : "")+ "line " + lineOrigin 
-                        + ": " + (last_check == null ? "" : last_check) +
-                        " [" + (count + 1) + "] -- uncaught exception:");
+    StringBuffer sb = 
+      new StringBuffer("  " + (verbose ? "FAIL: " : "")+ "line " + lineOrigin 
+		       + ": " + (last_check == null ? "" : last_check) +
+		       " [" + (count + 1) + "] -- uncaught exception:");
     
     // If a full stack trace will be printed, this method returns no details.
     if (exceptions)

  parent reply	other threads:[~2006-04-25 12:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-24 20:23 Anthony Balkissoon
2006-04-24 20:29 ` Anthony Balkissoon
2006-04-25 12:21 ` Gary Benson [this message]
2006-04-25 15:58   ` Anthony Balkissoon
2006-04-25 16:15     ` new Harness with compilation capabilities (FIX inline) Anthony Balkissoon
2006-04-25 16:24       ` Anthony Balkissoon
2006-04-26  9:58         ` Gary Benson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060425122051.GA5167@redhat.com \
    --to=gbenson@redhat.com \
    --cc=mauve-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).