diff options
author | Philipp Haller <hallerp@gmail.com> | 2008-09-18 09:01:38 +0000 |
---|---|---|
committer | Philipp Haller <hallerp@gmail.com> | 2008-09-18 09:01:38 +0000 |
commit | c8b96646e564d36999bda16b79f72a027332224c (patch) | |
tree | 602c83160b2764ccda27dabbad4f72029d02f258 /src/partest | |
parent | e4d18ccfbb3ad49eb1408eec773f72527bce4b11 (diff) | |
download | scala-c8b96646e564d36999bda16b79f72a027332224c.tar.gz scala-c8b96646e564d36999bda16b79f72a027332224c.tar.bz2 scala-c8b96646e564d36999bda16b79f72a027332224c.zip |
Boot class path and ext dirs are now set proper...
Boot class path and ext dirs are now set properly when creating
compilers to be tested. partest runner script now reads PARTEST_DEBUG
env. var (setting it to true enables debug output).
Diffstat (limited to 'src/partest')
-rw-r--r-- | src/partest/scala/tools/partest/nest/CompileManager.scala | 11 | ||||
-rw-r--r-- | src/partest/scala/tools/partest/nest/ReflectiveRunner.scala | 11 |
2 files changed, 20 insertions, 2 deletions
diff --git a/src/partest/scala/tools/partest/nest/CompileManager.scala b/src/partest/scala/tools/partest/nest/CompileManager.scala index 29981bcac4..87c3a7db85 100644 --- a/src/partest/scala/tools/partest/nest/CompileManager.scala +++ b/src/partest/scala/tools/partest/nest/CompileManager.scala @@ -23,12 +23,19 @@ abstract class SimpleCompiler { def compile(out: Option[File], files: List[File], kind: String, log: File): Boolean } +class TestSettings extends { + override val bootclasspathDefault = + System.getProperty("sun.boot.class.path", "") + override val extdirsDefault = + System.getProperty("java.ext.dirs", "") +} with Settings(x => ()) + class DirectCompiler(val fileManager: FileManager) extends SimpleCompiler { def newGlobal(settings: Settings, reporter: Reporter): Global = new Global(settings, reporter) def newGlobal(settings: Settings, logWriter: FileWriter): Global = { - val rep = new ExtConsoleReporter(new Settings(x => ()), + val rep = new ExtConsoleReporter(new TestSettings, Console.in, new PrintWriter(logWriter)) rep.shortname = true @@ -36,7 +43,7 @@ class DirectCompiler(val fileManager: FileManager) extends SimpleCompiler { } def newSettings = { - val settings = new Settings(x => ()) + val settings = new TestSettings settings.deprecation.value = true settings.nowarnings.value = false settings.encoding.value = "iso-8859-1" diff --git a/src/partest/scala/tools/partest/nest/ReflectiveRunner.scala b/src/partest/scala/tools/partest/nest/ReflectiveRunner.scala index 7aec84a30e..e99019822c 100644 --- a/src/partest/scala/tools/partest/nest/ReflectiveRunner.scala +++ b/src/partest/scala/tools/partest/nest/ReflectiveRunner.scala @@ -52,6 +52,17 @@ class ReflectiveRunner extends RunnerUtils { } try { + val newClasspath = sepUrls.mkString(java.io.File.pathSeparator) + System.setProperty("java.class.path", newClasspath) + System.setProperty("env.classpath", newClasspath) + System.setProperty("scala.home", "") + if (fileManager.debug) { + println("java.class.path: "+System.getProperty("java.class.path")) + println("env.classpath: "+System.getProperty("env.classpath")) + println("sun.boot.class.path: "+System.getProperty("sun.boot.class.path")) + println("java.ext.dirs: "+System.getProperty("java.ext.dirs")) + } + val sepRunnerClass = sepLoader.loadClass("scala.tools.partest.nest.ConsoleRunner") |