This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Patch: FYI: find mauve automatically
- From: Tom Tromey <tromey at redhat dot com>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 01 Nov 2002 13:25:12 -0700
- Subject: Patch: FYI: find mauve automatically
- Reply-to: tromey at redhat dot com
I'm checking this in.
If `mauve' exists in the libjava.mauve source directory, and MAUVEDIR
is not set, then we assume that that directory holds the mauve
sources. This makes life a little easier for some automated testers,
since now a simple checkout is all that is required to run the mauve
tests.
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
* libjava.mauve/mauve.exp (find_mauve_sources): New proc.
(test_mauve): Use it.
(test_mauve_sim): Likewise.
Index: libjava.mauve/mauve.exp
===================================================================
RCS file: /cvs/gcc/gcc/libjava/testsuite/libjava.mauve/mauve.exp,v
retrieving revision 1.15
diff -u -r1.15 mauve.exp
--- libjava.mauve/mauve.exp 7 Apr 2002 09:21:27 -0000 1.15
+++ libjava.mauve/mauve.exp 1 Nov 2002 19:30:48 -0000
@@ -52,12 +52,27 @@
return [lsort [array names uses]]
}
+# Find Mauve sources. At end, env(MAUVEDIR) points to sources.
+# Returns 0 if sources not found, 1 otherwise.
+proc find_mauve_sources {} {
+ global env srcdir
+
+ if {[info exists env(MAUVEDIR)]} {
+ return 1
+ } elseif {[file isdirectory $srcdir/libjava.mauve/mauve]} {
+ set env(MAUVEDIR) $srcdir/libjava.mauve/mauve
+ return 1
+ }
+
+ return 0
+}
+
# Run all the Mauve tests. Return 1 on success, 0 on any failure. If
# the tests are skipped, that is treated like success.
proc test_mauve {} {
global srcdir objdir subdir env
- if {! [info exists env(MAUVEDIR)]} then {
+ if {! [find_mauve_sources]} then {
verbose "MAUVEDIR not set; not running Mauve tests"
return 1
}
@@ -220,7 +235,7 @@
proc test_mauve_sim {} {
global srcdir subdir env
- if {! [info exists env(MAUVEDIR)]} then {
+ if {! [find_mauve_sources]} then {
verbose "MAUVEDIR not set; not running Mauve tests"
return 1
}