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]

Fwd: [cp-patches] [mauve] don't compile dependencies when using -compile no option


Mauve patches go here... ;)

---------- Forwarded message ----------
From: Andrew John Hughes <gnu_andrew@member.fsf.org>
Date: 28 Apr 2008 20:53
Subject: Re: [cp-patches] [mauve] don't compile dependencies when
using -compile no option
To: Christian Thalinger <twisti@complang.tuwien.ac.at>
Cc: classpath-patches ml <classpath-patches@gnu.org>


On 28/04/2008, Christian Thalinger <twisti@complang.tuwien.ac.at> wrote:
 > Hi!
 >
 >  This patch disables the compilation of dependencies when using the
 >  -compile no option.  When the dependency class does not exist it prints
 >  a FAIL message like:
 >
 >  FAIL: java.lang.Character.unicode
 >   One of the dependencies is not compiled.
 >
 >  We need this patch when we cross-compile Mauve for tgolem to be able to
 >  run it on low-performance architectures in a reasonable amount of time.
 >  OK to commit?
 >
 >  - twisti
 >
 >  ---
 >
 >  Index: Harness.java
 >  ===================================================================
 >  RCS file: /cvs/mauve/mauve/Harness.java,v
 >  retrieving revision 1.29
 >  diff -u -3 -p -r1.29 Harness.java
 >  --- Harness.java        7 Apr 2007 20:14:27 -0000       1.29
 >  +++ Harness.java        28 Apr 2008 19:09:16 -0000
 >  @@ -1095,33 +1095,68 @@ public class Harness
 >                                if (depend.endsWith(".class"))
 >                                  depend =
 >                                    depend.substring(0, depend.length() - 6);
 >  -                              if (! depend.endsWith(".java"))
 >  -                                depend += ".java";
 >
 >  -                              if (compileTest(depend) != 0)
 >  +                              if (!compileTests)
 >                                  {
 >  -                                  // One of the dependencies
failed to compile,
 >  -                                  // so we report the test as
failing and don't
 >  -                                  // try to run it.
 >  -                                  String shortName =
fullPath.substring(12, fullPath.length() - 5).
 >  -                                  replace(File.separatorChar, '.');
 >  -
 >  -                                  if (verbose)
 >  +                                  File cf = new File(depend + ".class");
 >  +                                  if (!cf.exists())
 >                                      {
 >  -                                      System.out.println("TEST: "
+ shortName);
 >  -                                      System.out.println("  FAIL:
One of the " +
 >  -                                      "dependencies failed to compile.");
 >  +                                      // There is a dependency class
 >  +                                      // missing, but the -compile no
 >  +                                      // option was given so we just
 >  +                                      // skip it
 >  +                                      String shortName =
fullPath.substring(12, fullPath.length() - 5).
 >  +                                        replace(File.separatorChar, '.');
 >  +
 >  +                                      if (verbose)
 >  +                                        {
 >  +
System.out.println("TEST: " + shortName);
 >  +                                          System.out.println("
FAIL: One of the " +
 >  +
"dependencies is not compiled.");
 >  +                                        }
 >  +                                      else
 >  +                                        {
 >  +
System.out.println("FAIL: " + shortName);
 >  +                                          System.out.println("
One of the " +
 >  +
"dependencies is not compiled.");
 >  +                                        }
 >  +                                      total_test_fails++;
 >  +                                      total_tests++;
 >  +                                      sb.setLength(sb.length() -
fullPath.length() - 1);
 >  +                                      count --;
 >                                      }
 >  -                                  else
 >  +                                }
 >  +                              else
 >  +                                {
 >  +                                  if (! depend.endsWith(".java"))
 >  +                                    depend += ".java";
 >  +
 >  +                                  if (compileTest(depend) != 0)
 >                                      {
 >  -                                      System.out.println("FAIL: "
+ shortName);
 >  -                                      System.out.println("  One of the " +
 >  -                                      "dependencies failed to compile.");
 >  +                                      // One of the dependencies
 >  +                                      // failed to compile, so we
 >  +                                      // report the test as failing
 >  +                                      // and don't try to run it.
 >  +                                      String shortName =
fullPath.substring(12, fullPath.length() - 5).
 >  +                                        replace(File.separatorChar, '.');
 >  +
 >  +                                      if (verbose)
 >  +                                        {
 >  +
System.out.println("TEST: " + shortName);
 >  +                                          System.out.println("
FAIL: One of the " +
 >  +
"dependencies failed to compile.");
 >  +                                        }
 >  +                                      else
 >  +                                        {
 >  +
System.out.println("FAIL: " + shortName);
 >  +                                          System.out.println("
One of the " +
 >  +
"dependencies failed to compile.");
 >  +                                        }
 >  +                                      total_test_fails++;
 >  +                                      total_tests++;
 >  +                                      sb.setLength(sb.length() -
fullPath.length() - 1);
 >  +                                      count --;
 >                                      }
 >  -                                  total_test_fails++;
 >  -                                  total_tests++;
 >  -                                  sb.setLength(sb.length() -
fullPath.length() - 1);
 >  -                                  count --;
 >                                  }
 >                              }
 >                            break;
 >
 >
 >
 >


Sounds like a sensible idea to me.
 --
 Andrew :-)

 Support Free Java!
 Contribute to GNU Classpath and the OpenJDK
 http://www.gnu.org/software/classpath
 http://openjdk.java.net

 PGP Key: 94EFD9D8 (http://subkeys.pgp.net)
 Fingerprint: F8EF F1EA 401E 2E60 15FA  7927 142C 2591 94EF D9D8


-- 
Andrew :-)

Support Free Java!
Contribute to GNU Classpath and the OpenJDK
http://www.gnu.org/software/classpath
http://openjdk.java.net

PGP Key: 94EFD9D8 (http://subkeys.pgp.net)
Fingerprint: F8EF F1EA 401E 2E60 15FA  7927 142C 2591 94EF D9D8


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