* Fwd: [cp-patches] [mauve] don't compile dependencies when using -compile no option
[not found] ` <17c6771e0804281253j54275244obe11bb7f34890909@mail.gmail.com>
@ 2008-04-28 19:54 ` Andrew John Hughes
0 siblings, 0 replies; only message in thread
From: Andrew John Hughes @ 2008-04-28 19:54 UTC (permalink / raw)
To: mauve-patches
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-04-28 19:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <1209410494.9758.5.camel@workstation.home.at>
[not found] ` <17c6771e0804281253j54275244obe11bb7f34890909@mail.gmail.com>
2008-04-28 19:54 ` Fwd: [cp-patches] [mauve] don't compile dependencies when using -compile no option Andrew John Hughes
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).