diff options
author | michelou <michelou@epfl.ch> | 2007-04-18 11:55:03 +0000 |
---|---|---|
committer | michelou <michelou@epfl.ch> | 2007-04-18 11:55:03 +0000 |
commit | b1c47f7bfafc30f3ff2d4e7af7a56790cc8643de (patch) | |
tree | 8902c4e1ea06c45530fb4a1311481833ab6087d9 /test | |
parent | 755fb899e3599617c3b3083cd5353f6508497810 (diff) | |
download | scala-b1c47f7bfafc30f3ff2d4e7af7a56790cc8643de.tar.gz scala-b1c47f7bfafc30f3ff2d4e7af7a56790cc8643de.tar.bz2 scala-b1c47f7bfafc30f3ff2d4e7af7a56790cc8643de.zip |
added support for JRE 1.7 and GIJ 4.1
Diffstat (limited to 'test')
-rwxr-xr-x | test/scalatest | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/test/scalatest b/test/scalatest index 9a87774b59..87dbb0d402 100755 --- a/test/scalatest +++ b/test/scalatest @@ -612,10 +612,11 @@ SCALA_LIB="$LATEST_LIB"; [ -x "$JAVACMD" ] || JAVACMD=java; [ -n "$JAVA_OPTS" ] || JAVA_OPTS="-Xmx256M -Xms16M"; -case `$JAVACMD \-version 2>&1 | head -1` in - *1.5*) JAVA5="true";; - *1.6*) JAVA5="true"; JAVA_OPTS="$JAVA_OPTS -Xss32m";; - *) JAVA5="false";; +# -Xss option available in Java versions 1.5 or newer +case `$JAVACMD \-version 2>&1 | xargs` in + *1.[5-7].* ) JAVA5="true"; JAVA_OPTS="$JAVA_OPTS -Xss16m";; # stack size + *1.4.*GNU* ) JAVA5="false"; GIJ="true"; JAVA_OPTS="--mx256m --ms16m";; + * ) JAVA5="false";; esac; DIFF="diff"; @@ -744,7 +745,11 @@ printf_outline "Scala version is : $scala_version\\n"; javacmd=`which $JAVACMD`; bin_dir=`test_get_location $javacmd`; printf_outline "Java binaries in : $bin_dir\\n"; -jvm_version=`$JAVACMD -version 2>&1 | head -3 | tail -1` +if [ "$GIJ" = "true" ]; then + jvm_version=`$JAVACMD -version 2>&1 | head -2 | tail -1` +else + jvm_version=`$JAVACMD -version 2>&1 | head -3 | tail -1` +fi; printf_outline "Java runtime is : $jvm_version\\n"; [ -n "$JAVA_OPTS" ] && printf_outline "Java options are : $JAVA_OPTS\\n"; printf_outline "\\n"; |