OSDN Git Service

* libjava.mauve/mauve.exp (find_mauve_sources): New proc.
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 1 Nov 2002 19:32:21 +0000 (19:32 +0000)
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 1 Nov 2002 19:32:21 +0000 (19:32 +0000)
(test_mauve): Use it.
(test_mauve_sim): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@58725 138bc75d-0d04-0410-961f-82ee72b054a4

libjava/testsuite/ChangeLog
libjava/testsuite/libjava.mauve/mauve.exp

index 18cfe85..639117b 100644 (file)
@@ -1,3 +1,9 @@
+2002-11-01  Tom Tromey  <tromey@redhat.com>
+
+       * libjava.mauve/mauve.exp (find_mauve_sources): New proc.
+       (test_mauve): Use it.
+       (test_mauve_sim): Likewise.
+
 2002-10-24  Tom Tromey  <tromey@redhat.com>
 
        * libjava.lang/Primes.java: Removed.
index 4a26b27..a9a1c98 100644 (file)
@@ -52,12 +52,27 @@ proc mauve_compute_uses {aName} {
   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 {} {
 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
   }