Temp-dir configuration a la Bug 401389 - Should specify our own
-Djava.io.tmpdir for our JUnit tests
diff --git a/releng/build-scripts/build/otdt_prerequisites.sh b/releng/build-scripts/build/otdt_prerequisites.sh
index 75db6b8..a108d9c 100644
--- a/releng/build-scripts/build/otdt_prerequisites.sh
+++ b/releng/build-scripts/build/otdt_prerequisites.sh
@@ -20,6 +20,9 @@
 # EXPORT: tmp directory for logging:
 TMPDIR="${BASEDIR}/tmp"
 
+# EXPORT: tmp directory for test files:
+TEST_TMPDIR="${HOME}/tmp"
+
 # EXPORT: directory for metadata from previous builds:
 METADATA="${BASEDIR}/metadata"
 
@@ -62,5 +65,5 @@
 ECLIPSE_TESTLIB_ZIP=${DROP}/eclipse-test-framework-${EVERSION}.zip
 
 # EXPORT: where to find previously published plugins&features:
-PUBLISHED_UPDATES=${HOME}/downloads/objectteams/updates/ot2.1
+PUBLISHED_UPDATES=${HOME}/downloads/objectteams/updates/ot2.2
 
diff --git a/releng/build-scripts/build/otdt_runtests.sh b/releng/build-scripts/build/otdt_runtests.sh
index 58fc310..544a959 100755
--- a/releng/build-scripts/build/otdt_runtests.sh
+++ b/releng/build-scripts/build/otdt_runtests.sh
@@ -15,6 +15,7 @@
 # INPUT: Variables from otdt_prerequisites:
 # -----------------------------------------------------------------------------
 # TMPDIR                for log output
+# TEST_TMPDIR           for temp test files
 # OT_TESTSUITE_DIR      root directory for building and testing
 # METADATA				directory for metadata from previous builds
 # OT_RECIPIENT          mail address for failure messages
@@ -90,6 +91,7 @@
 #LOCAL: Display to be used by VNC:
 VNC_DISPLAY=:23
 
+
 while test $# -gt 0; do
 	case "$1" in 
     -b)
@@ -105,6 +107,11 @@
 	    X11=X11
 		shift
 		;;
+	-tmp)
+        shift
+        TEST_TMPDIR="$1"
+        shift
+        ;;
 	*)
 		echo "Unknown argument: $1"
 		usage
@@ -144,7 +151,8 @@
     -Declipse.tests.zip=${ECLIPSE_TESTLIB_ZIP} \
     -Dpublished.updates=${PUBLISHED_UPDATES} \
     -Ddo.run.tests=${DO_RUN} \
-    -Ddo.build.all=${DO_BUILD}"
+    -Ddo.build.all=${DO_BUILD} \
+    -Dtest.tmpDir=${TEST_TMPDIR}"
 
 ANT_OPTS="-Xmx1024m"
 export ANT_OPTS
diff --git a/releng/build-scripts/build/run.xml b/releng/build-scripts/build/run.xml
index 2d709e7..7f9bd21 100644
--- a/releng/build-scripts/build/run.xml
+++ b/releng/build-scripts/build/run.xml
@@ -25,6 +25,8 @@
 		do.build.all     = ${do.build.all}
 should test be run (true|false)?
 		do.run.tests     = ${do.run.tests}
+directory for tempory files during testing:
+		test.tmpDir		 = ${test.tmpDir}
 ------------------------------------------------------------------------------
 		</echo>
 	</target>
@@ -343,6 +345,7 @@
 			<property name="basearch" value="${arch}" />
 			<property name="otdtUpdatesDir" value="${otdtUpdatesDir}" />
 			<property name="testsUpdatesDirBase" value="${testsUpdatesDirBase}" />
+			<property name="test.tmpDir" value="${test.tmpDir}"/>
 			<property name="vmargs" value="${vmargs}" />
 		</ant>
 	</target>
@@ -357,6 +360,7 @@
 			<property name="basearch" value="${arch}" />
 			<property name="otdtUpdatesDir" value="${otdtUpdatesDir}" />
 			<property name="testsUpdatesDirBase" value="${testsUpdatesDirBase}" />
+			<property name="test.tmpDir" value="${test.tmpDir}"/>
 			<property name="vmargs" value="${vmargs}" />
 		</ant>
 	</target>
diff --git a/releng/build-scripts/build/test.xml b/releng/build-scripts/build/test.xml
index b5597d9..e89f0a2 100644
--- a/releng/build-scripts/build/test.xml
+++ b/releng/build-scripts/build/test.xml
@@ -59,7 +59,7 @@
 	>

 		<ant antfile="plugins/${testPlugin}/test.xml" dir="${test.eclipseDir}">

 			<property name="eclipse-home" value="${test.eclipseDir}" />

-            <property name="extraVMargs" value="-XX:MaxPermSize=320m -XX:+HeapDumpOnOutOfMemoryError"/>

+            <property name="extraVMargs" value="-XX:MaxPermSize=320m -XX:+HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=${test.tmpDir}"/>

 		</ant>

 	</target>