summaryrefslogtreecommitdiff
path: root/test/scalatest
diff options
context:
space:
mode:
authorIulian Dragos <jaguarul@gmail.com>2006-11-02 11:20:08 +0000
committerIulian Dragos <jaguarul@gmail.com>2006-11-02 11:20:08 +0000
commit12ef0e12725812e536b912f9b0b8d546f0ebfd10 (patch)
tree5126a3cdc20b399a3622f6b7f2a554169d8d3f79 /test/scalatest
parent6b142c2217096e262e52c06753ad520a2eab054a (diff)
downloadscala-12ef0e12725812e536b912f9b0b8d546f0ebfd10.tar.gz
scala-12ef0e12725812e536b912f9b0b8d546f0ebfd10.tar.bz2
scala-12ef0e12725812e536b912f9b0b8d546f0ebfd10.zip
Forgotten file, belongs to the previous commit ...
Forgotten file, belongs to the previous commit with 'nest' test cases.
Diffstat (limited to 'test/scalatest')
-rwxr-xr-xtest/scalatest22
1 files changed, 20 insertions, 2 deletions
diff --git a/test/scalatest b/test/scalatest
index 356775d15e..515b2df871 100755
--- a/test/scalatest
+++ b/test/scalatest
@@ -129,6 +129,22 @@ get_unix_pathlist() {
esac;
}
+# Collects all jar files in the given path
+get_ext_classpath() {
+ [ $# = 1 ] || abort "internal error";
+ # Constructing the extension classpath
+ cp=""
+ for ext in `ls $1/*.jar` ; do
+ if [ -z "$cp" ] ; then
+ cp="$ext"
+ else
+ cp="$cp:$ext"
+ fi
+ done
+
+ echo $cp
+}
+
##############################################################################
# Implementation of scalatest
@@ -225,10 +241,10 @@ test_run_neg() {
test_run_jvm() {
rm -rf "$dstbase".obj &&
mkdir -p "$dstbase".obj &&
- $SCALAC -d "$os_dstbase".obj "$@" "$os_srcbase".scala &&
+ $SCALAC -d "$os_dstbase".obj -cp "$JVM_EXT_CLASSPATH" "$@" "$os_srcbase".scala &&
scala_lib=`get_os_filename "$SCALA_LIB"` &&
classpath=`get_os_pathlist "$os_dstbase".obj:$CLASSPATH` &&
- $SCALA -Dscalatest.output=$os_dstbase.obj -Dscalatest.lib=$scala_lib -classpath $classpath Test "jvm" &&
+ $SCALA -Dscalatest.output=$os_dstbase.obj -Dscalatest.lib=$scala_lib -classpath $classpath:$JVM_EXT_CLASSPATH Test "jvm" &&
rm -rf "$dstbase".obj;
}
@@ -531,6 +547,8 @@ FILES_ANT="";
QUICK="$PREFIX/build/quick/bin"
QUICK_LIB="$PREFIX/build/quick/lib/library"
+JVM_EXT_CLASSPATH=`get_ext_classpath $TESTROOT/files/jvm/lib`
+
if [ -d "$PREFIX/dists" ]; then
LATEST="$PREFIX/dists/latest/bin";
LATEST_LIB="$PREFIX/dists/latest/lib/scala-library.jar";