summaryrefslogtreecommitdiff
path: root/src/partest
diff options
context:
space:
mode:
authorPhilipp Haller <hallerp@gmail.com>2008-10-24 18:39:21 +0000
committerPhilipp Haller <hallerp@gmail.com>2008-10-24 18:39:21 +0000
commit17d9b4a800dd0cdb5de929f539061c8b6a19df44 (patch)
treeed7b9f9a9e51a4114686f93a8a6e475e0d4036d3 /src/partest
parentcb2364e9c813c7f51a96b0cc59d54aca159c6f31 (diff)
downloadscala-17d9b4a800dd0cdb5de929f539061c8b6a19df44.tar.gz
scala-17d9b4a800dd0cdb5de929f539061c8b6a19df44.tar.bz2
scala-17d9b4a800dd0cdb5de929f539061c8b6a19df44.zip
Ported recent partest fixes in 2.7.2 branch.
Diffstat (limited to 'src/partest')
-rw-r--r--src/partest/scala/tools/partest/nest/CompileManager.scala9
-rw-r--r--src/partest/scala/tools/partest/nest/ReflectiveRunner.scala9
-rw-r--r--src/partest/scala/tools/partest/nest/Worker.scala3
3 files changed, 16 insertions, 5 deletions
diff --git a/src/partest/scala/tools/partest/nest/CompileManager.scala b/src/partest/scala/tools/partest/nest/CompileManager.scala
index 87c3a7db85..7775ce699c 100644
--- a/src/partest/scala/tools/partest/nest/CompileManager.scala
+++ b/src/partest/scala/tools/partest/nest/CompileManager.scala
@@ -23,9 +23,10 @@ abstract class SimpleCompiler {
def compile(out: Option[File], files: List[File], kind: String, log: File): Boolean
}
-class TestSettings extends {
+class TestSettings(fileMan: FileManager) extends {
override val bootclasspathDefault =
- System.getProperty("sun.boot.class.path", "")
+ System.getProperty("sun.boot.class.path", "") + File.pathSeparator +
+ fileMan.LATEST_LIB
override val extdirsDefault =
System.getProperty("java.ext.dirs", "")
} with Settings(x => ())
@@ -35,7 +36,7 @@ class DirectCompiler(val fileManager: FileManager) extends SimpleCompiler {
new Global(settings, reporter)
def newGlobal(settings: Settings, logWriter: FileWriter): Global = {
- val rep = new ExtConsoleReporter(new TestSettings,
+ val rep = new ExtConsoleReporter(new TestSettings(fileManager),
Console.in,
new PrintWriter(logWriter))
rep.shortname = true
@@ -43,7 +44,7 @@ class DirectCompiler(val fileManager: FileManager) extends SimpleCompiler {
}
def newSettings = {
- val settings = new TestSettings
+ val settings = new TestSettings(fileManager)
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 e99019822c..7afe1a4a1a 100644
--- a/src/partest/scala/tools/partest/nest/ReflectiveRunner.scala
+++ b/src/partest/scala/tools/partest/nest/ReflectiveRunner.scala
@@ -52,7 +52,14 @@ class ReflectiveRunner extends RunnerUtils {
}
try {
- val newClasspath = sepUrls.mkString(java.io.File.pathSeparator)
+ val paths = if (!classPath.isEmpty)
+ Array(latestCompFile.getPath, latestLibFile.getPath,
+ latestActFile.getPath, latestPartestFile.getPath,
+ latestFjbgFile.getPath)
+ else
+ Array(latestCompFile.getPath, latestLibFile.getPath,
+ latestActFile.getPath, latestPartestFile.getPath)
+ val newClasspath = paths.mkString(java.io.File.pathSeparator)
System.setProperty("java.class.path", newClasspath)
System.setProperty("env.classpath", newClasspath)
System.setProperty("scala.home", "")
diff --git a/src/partest/scala/tools/partest/nest/Worker.scala b/src/partest/scala/tools/partest/nest/Worker.scala
index b3aedc82ff..3eafbc7240 100644
--- a/src/partest/scala/tools/partest/nest/Worker.scala
+++ b/src/partest/scala/tools/partest/nest/Worker.scala
@@ -223,6 +223,9 @@ class Worker(val fileManager: FileManager) extends Actor {
} else ""
NestUI.verbose("JAVA_OPTS: "+argString)
+ val cp = System.getProperty("java.class.path", ".")
+ NestUI.verbose("java.class.path: "+cp)
+
def quote(path: String) = "\""+path+"\""
val cmd =