diff options
author | Paul Phillips <paulp@improving.org> | 2010-02-14 01:00:37 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-02-14 01:00:37 +0000 |
commit | 730720552b80eacd2581f860fbd861098e54fa7e (patch) | |
tree | 9bb850bf8aaa7f0f4364171da10864dc96d1a95f /src/partest | |
parent | d04911d894ce107593c773d253d19b5d094a2ad0 (diff) | |
download | scala-730720552b80eacd2581f860fbd861098e54fa7e.tar.gz scala-730720552b80eacd2581f860fbd861098e54fa7e.tar.bz2 scala-730720552b80eacd2581f860fbd861098e54fa7e.zip |
Reducing the amount of low-level classpath mani...
Reducing the amount of low-level classpath manipulation going on around
town. No review.
Diffstat (limited to 'src/partest')
-rw-r--r-- | src/partest/scala/tools/partest/nest/CompileManager.scala | 6 | ||||
-rw-r--r-- | src/partest/scala/tools/partest/nest/ReflectiveRunner.scala | 5 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/partest/scala/tools/partest/nest/CompileManager.scala b/src/partest/scala/tools/partest/nest/CompileManager.scala index 8d440b398f..ecf8b07b8e 100644 --- a/src/partest/scala/tools/partest/nest/CompileManager.scala +++ b/src/partest/scala/tools/partest/nest/CompileManager.scala @@ -10,6 +10,7 @@ package nest import scala.tools.nsc.{Global, Settings, CompilerCommand, FatalError} import scala.tools.nsc.reporters.{Reporter, ConsoleReporter} +import scala.tools.nsc.util.ClassPath import scala.tools.util.PathResolver import java.io.{File, BufferedReader, PrintWriter, FileReader, FileWriter, StringWriter} @@ -27,8 +28,9 @@ abstract class SimpleCompiler { } class TestSettings(fileMan: FileManager) extends Settings(x => ()) { - javabootclasspath.value = - PathResolver.Environment.javaBootClassPath + (pathSeparator + fileMan.LATEST_LIB) + javabootclasspath.value = ClassPath.join( + List(PathResolver.Environment.javaBootClassPath, fileMan.LATEST_LIB) + ) } class DirectCompiler(val fileManager: FileManager) extends SimpleCompiler { diff --git a/src/partest/scala/tools/partest/nest/ReflectiveRunner.scala b/src/partest/scala/tools/partest/nest/ReflectiveRunner.scala index bcedaa38be..2ae67db566 100644 --- a/src/partest/scala/tools/partest/nest/ReflectiveRunner.scala +++ b/src/partest/scala/tools/partest/nest/ReflectiveRunner.scala @@ -8,6 +8,8 @@ package scala.tools.partest package nest +import scala.tools.nsc.util.ClassPath + /* This class is used to load an instance of DirectRunner using * a custom class loader. * The purpose is to "auto-detect" a good classpath for the @@ -21,7 +23,6 @@ class ReflectiveRunner extends RunnerUtils { // was used to start the runner. import java.net.URLClassLoader - import java.io.File.pathSeparator import utils.Properties.{ sysprop, syspropset } val sepRunnerClassName = "scala.tools.partest.nest.ConsoleRunner" @@ -54,7 +55,7 @@ class ReflectiveRunner extends RunnerUtils { println("Loading classes from:\n" + sepUrls.mkString("\n")) val paths = (if (classPath.isEmpty) files.slice(0, 4) else files) map { _.getPath } - val newClasspath = paths mkString pathSeparator + val newClasspath = ClassPath join paths syspropset("java.class.path", newClasspath) syspropset("scala.home", "") |