summaryrefslogtreecommitdiff
path: root/test/instrumented/mkinstrumented
diff options
context:
space:
mode:
Diffstat (limited to 'test/instrumented/mkinstrumented')
-rwxr-xr-xtest/instrumented/mkinstrumented46
1 files changed, 46 insertions, 0 deletions
diff --git a/test/instrumented/mkinstrumented b/test/instrumented/mkinstrumented
new file mode 100755
index 0000000000..a87e8cb94f
--- /dev/null
+++ b/test/instrumented/mkinstrumented
@@ -0,0 +1,46 @@
+#
+#
+# Used to compile a jar with instrumented versions of certain classes.
+#
+
+
+
+
+if [ $# -ne 1 ]
+then
+ echo "Must provide build dir ('target' or 'build')."
+ exit 1
+fi
+
+
+BUILDDIR=$1
+TOPDIR=../..
+SCALAC=$TOPDIR/$BUILDDIR/pack/bin/scalac
+SRC_DIR=library/
+SCALALIB=$TOPDIR/$BUILDDIR/pack/lib/scala-library.jar
+CLASSDIR=classes/
+ARTIFACT=instrumented.jar
+
+
+# compile it
+rm -rf $CLASSDIR
+mkdir $CLASSDIR
+JSOURCES=`find $SRC_DIR -name "*.java" -print`
+SOURCES=`find $SRC_DIR \( -name "*.scala" -o -name "*.java" \) -print`
+echo $SOURCES
+$SCALAC -d $CLASSDIR $SOURCES
+javac -cp $SCALALIB -d $CLASSDIR $JSOURCES
+
+
+# jar it up
+rm $ARTIFACT
+cd $CLASSDIR
+jar cf $ARTIFACT .
+mv $ARTIFACT ../
+cd ..
+
+
+
+
+
+