diff options
author | Paul Phillips <paulp@improving.org> | 2010-02-11 15:10:45 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-02-11 15:10:45 +0000 |
commit | e9a60f236b00d417ddd6fd2ac30448f0228b2921 (patch) | |
tree | d7c2fdbccac5ac406eec4df020a7ef2f0785c7a8 /src/partest | |
parent | a78bf650be7cc82e43907d1bbf966b3d802fc301 (diff) | |
download | scala-e9a60f236b00d417ddd6fd2ac30448f0228b2921.tar.gz scala-e9a60f236b00d417ddd6fd2ac30448f0228b2921.tar.bz2 scala-e9a60f236b00d417ddd6fd2ac30448f0228b2921.zip |
More work on classpaths.
which we must have no test cases at all. In the short term there
will probably be a few more minor disruptions since with classpaths
constructed a half dozen different ways, achieving consistency requires
flushing out the undocumented accidents upon which any given island
might depend. Review by community.
Diffstat (limited to 'src/partest')
-rw-r--r-- | src/partest/scala/tools/partest/nest/CompileManager.scala | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/partest/scala/tools/partest/nest/CompileManager.scala b/src/partest/scala/tools/partest/nest/CompileManager.scala index e9d9d65390..8d440b398f 100644 --- a/src/partest/scala/tools/partest/nest/CompileManager.scala +++ b/src/partest/scala/tools/partest/nest/CompileManager.scala @@ -10,8 +10,10 @@ package nest import scala.tools.nsc.{Global, Settings, CompilerCommand, FatalError} import scala.tools.nsc.reporters.{Reporter, ConsoleReporter} +import scala.tools.util.PathResolver import java.io.{File, BufferedReader, PrintWriter, FileReader, FileWriter, StringWriter} +import File.pathSeparator class ExtConsoleReporter(override val settings: Settings, reader: BufferedReader, var writer: PrintWriter) extends ConsoleReporter(settings, reader, writer) { def this(settings: Settings) = { @@ -24,13 +26,10 @@ abstract class SimpleCompiler { def compile(out: Option[File], files: List[File], kind: String, log: File): Boolean } -class TestSettings(fileMan: FileManager) extends { - override val bootclasspathDefault = - System.getProperty("sun.boot.class.path", "") + File.pathSeparator + - fileMan.LATEST_LIB - override val extdirsDefault = - System.getProperty("java.ext.dirs", "") -} with Settings(x => ()) +class TestSettings(fileMan: FileManager) extends Settings(x => ()) { + javabootclasspath.value = + PathResolver.Environment.javaBootClassPath + (pathSeparator + fileMan.LATEST_LIB) +} class DirectCompiler(val fileManager: FileManager) extends SimpleCompiler { def newGlobal(settings: Settings, reporter: Reporter): Global = @@ -63,14 +62,14 @@ class DirectCompiler(val fileManager: FileManager) extends SimpleCompiler { if (opt1.isEmpty) "" else { def absolutize(path: String): List[String] = { - val args = (path substring 9 split File.pathSeparator).toList + val args = (path substring 9 split pathSeparator).toList val plugins = args map (arg => if (new File(arg).isAbsolute) arg else fileManager.TESTROOT+File.separator+arg ) plugins } - " -Xplugin:"+((opt1 flatMap absolutize) mkString File.pathSeparator) + " -Xplugin:"+((opt1 flatMap absolutize) mkString pathSeparator) } ) } |