summaryrefslogtreecommitdiffstats
path: root/libjava/testsuite/libjava.mauve/mauve.exp
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2002-11-01 19:32:21 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2002-11-01 19:32:21 +0000
commitd9c89332eed6a5cc4b84066b2a95e17d28a30c13 (patch)
tree5a53bd54e4084ff9f301fcc5f421e7659e2bc3b2 /libjava/testsuite/libjava.mauve/mauve.exp
parent59389751b296efb8bd432f9ad954402b54456b3b (diff)
downloadppe42-gcc-d9c89332eed6a5cc4b84066b2a95e17d28a30c13.tar.gz
ppe42-gcc-d9c89332eed6a5cc4b84066b2a95e17d28a30c13.zip
* libjava.mauve/mauve.exp (find_mauve_sources): New proc.
(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
Diffstat (limited to 'libjava/testsuite/libjava.mauve/mauve.exp')
-rw-r--r--libjava/testsuite/libjava.mauve/mauve.exp19
1 files changed, 17 insertions, 2 deletions
diff --git a/libjava/testsuite/libjava.mauve/mauve.exp b/libjava/testsuite/libjava.mauve/mauve.exp
index 4a26b27242d..a9a1c98d6ac 100644
--- a/libjava/testsuite/libjava.mauve/mauve.exp
+++ b/libjava/testsuite/libjava.mauve/mauve.exp
@@ -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
}
OpenPOWER on IntegriCloud