preparations for upcoming otjld-tests.
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AbstractRegressionTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AbstractRegressionTest.java
index 90e19f5..38bb9bc 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AbstractRegressionTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AbstractRegressionTest.java
@@ -2227,7 +2227,12 @@
 		compilerOptions.produceReferenceInfo = true;
 		Throwable exception = null;
 		try {
+//{ObjectTeams: extracted as new hook:
+/* orig:
 			batchCompiler.compile(Util.compilationUnits(testFiles)); // compile all files together
+  :giro */
+			compileTestFiles(batchCompiler, testFiles);
+// SH}
 		} catch(RuntimeException e){
 			exception = e;
 			throw e;
@@ -2263,11 +2268,21 @@
 			String className = sourceFile.substring(0, sourceFile.length() - 5).replace('/', '.').replace('\\', '.');
 			if (className.endsWith(PACKAGE_INFO_NAME)) return;
 
+//{ObjectTeams: also reuse if same set of vmArguments:
+/* orig:
 			if (vmArguments != null) {
+  :giro */
+			if (this.verifier != null && !this.verifier.vmArgsEqual(vmArguments)) {
+// SH}
 				if (this.verifier != null) {
 					this.verifier.shutDown();
 				}
+//{ObjectTeams: make configurable:
+/* orig:
 				this.verifier = new TestVerifier(false);
+  :giro */
+				this.verifier = getTestVerifier(false);
+// SH}
 				this.createdVerifier = true;
 			}
 			boolean passed =
@@ -2313,6 +2328,14 @@
 					javacTestOptions, vmArguments);
 		}
 	}
+//{ObjectTeams: new hooks:
+	protected TestVerifier getTestVerifier(boolean reuseVM) {
+		return new TestVerifier(reuseVM);
+	}
+	protected void compileTestFiles(Compiler batchCompiler, String[] testFiles) {
+		batchCompiler.compile(Util.compilationUnits(testFiles)); // compile all files together
+	}
+// SH}
 
 //	runConformTest(
 //		// test directory preparation
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InMemoryNameEnvironment.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InMemoryNameEnvironment.java
index 4eb0b54..39615c9 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InMemoryNameEnvironment.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InMemoryNameEnvironment.java
@@ -16,6 +16,9 @@
 import org.eclipse.jdt.internal.compiler.util.HashtableOfObject;
 
 public class InMemoryNameEnvironment implements INameEnvironment {
+//{ObjectTeams: visible for subclass:
+	protected
+// SH}
 	INameEnvironment[] classLibs;
 	HashtableOfObject compilationUnits = new HashtableOfObject();
 public InMemoryNameEnvironment(String[] compilationUnits, INameEnvironment[] classLibs) {
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/RegressionTestSetup.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/RegressionTestSetup.java
index 32097a9..6686c8e 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/RegressionTestSetup.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/RegressionTestSetup.java
@@ -18,6 +18,9 @@
 
 public class RegressionTestSetup extends CompilerTestSetup {
 
+//{ObjectTeams: visible for tests in other plugin:
+	public
+// SH}
 	TestVerifier verifier = new TestVerifier(true);
 	INameEnvironment javaClassLib;
 
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/util/TestVerifier.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/util/TestVerifier.java
index 8c38c58..786394a 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/util/TestVerifier.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/util/TestVerifier.java
@@ -22,6 +22,9 @@
 	public String failureReason;
 
 	boolean reuseVM = true;
+//{ObjectTeams: support reuse even in presence of vmargs, if unchanged:
+	protected String[] vmArguments = null;
+// SH}
 	String[] classpathCache;
 	LocalVirtualMachine vm;
 	StringBuffer outputBuffer;
@@ -236,6 +239,17 @@
 		"		if (name.startsWith(\"java\"))\n" +
 		"			return true;\n" +
 		"			\n" +
+//{ObjectTeams: don't process core OT-classes either (unpacked .class not available on classpath):
+"		if (name.startsWith(\"org.objectteams\"))\n" +
+"			return true;\n" +
+"			\n" +
+"		if (name.startsWith(\"org.eclipse.objectteams.otre\"))\n" +
+"			return true;\n" +
+"			\n" +
+"		if (name.startsWith(\"de.fub.bytecode\"))\n" +
+"			return true;\n" +
+"			\n" +
+// SH}
 		"		// exclude the user defined package paths\n" +
 		"		for (int i= 0; i < fExcluded.length; i++) {\n" +
 		"			if (name.startsWith(fExcluded[i])) {\n" +
@@ -650,4 +664,16 @@
 	this.errorBuffer.setLength(errorEndStringStart);
 	this.outputBuffer.setLength(outputEndStringStart);
 }
+//{ObjectTeams: helper
+public boolean vmArgsEqual(String[] newArgs) {
+	if (this.vmArguments == null || newArgs == null) 
+		return this.vmArguments == null && newArgs == null;
+	if (this.vmArguments.length != newArgs.length)
+		return false;
+	for (int i=0; i<newArgs.length; i++)
+		if (!this.vmArguments[i].equals(newArgs[i]))
+			return false;
+	return true;
+}
+// SH}
 }