From 525aef50a257c483f87f434d79df3fb7a5144a51 Mon Sep 17 00:00:00 2001 From: Lukas Rytz Date: Wed, 7 May 2008 16:31:46 +0000 Subject: - updated partest to work with SuperSabbus (pac... - updated partest to work with SuperSabbus (pack direcotry) and installed distributions.\n-removed 'latestFjbgFile' where apropriate, because fjbg is now included in scala-compiler.jar.\n-updated runner scripts to work with an installed distribution. --- .../scala/tools/partest/nest/CompileManager.scala | 5 ++-- .../tools/partest/nest/ConsoleFileManager.scala | 27 ++++++++++++---------- .../tools/partest/nest/ReflectiveRunner.scala | 5 ++-- src/partest/scala/tools/partest/nest/Worker.scala | 5 ++-- 4 files changed, 21 insertions(+), 21 deletions(-) (limited to 'src/partest') diff --git a/src/partest/scala/tools/partest/nest/CompileManager.scala b/src/partest/scala/tools/partest/nest/CompileManager.scala index fc07b6e625..07c88ccc34 100644 --- a/src/partest/scala/tools/partest/nest/CompileManager.scala +++ b/src/partest/scala/tools/partest/nest/CompileManager.scala @@ -111,10 +111,9 @@ class DirectCompiler(val fileManager: FileManager) extends SimpleCompiler { } class ReflectiveCompiler(val fileManager: ConsoleFileManager) extends SimpleCompiler { - import fileManager.{latestCompFile, latestPartestFile, latestFjbgFile} + import fileManager.{latestCompFile, latestPartestFile} - val sepUrls = Array(latestCompFile.toURL, latestPartestFile.toURL, - latestFjbgFile.toURL) + val sepUrls = Array(latestCompFile.toURL, latestPartestFile.toURL) //NestUI.verbose("constructing URLClassLoader from URLs "+latestCompFile+" and "+latestPartestFile) val sepLoader = new java.net.URLClassLoader(sepUrls, null) diff --git a/src/partest/scala/tools/partest/nest/ConsoleFileManager.scala b/src/partest/scala/tools/partest/nest/ConsoleFileManager.scala index 971bd30659..5bcee60ff1 100644 --- a/src/partest/scala/tools/partest/nest/ConsoleFileManager.scala +++ b/src/partest/scala/tools/partest/nest/ConsoleFileManager.scala @@ -74,13 +74,19 @@ else def findLatest() { val testParent = testRootFile.getParentFile - def prefixFile(relPath: String): File = - (new File(testParent, relPath)).getCanonicalFile + def prefixFileWith(parent: File, relPath: String): File = { + (new File(parent, relPath)).getCanonicalFile + } + + def prefixFile(relPath: String): File = { + prefixFileWith(testParent, relPath) + } NestUI.verbose("test parent: "+testParent) val dists = new File(testParent, "dists") val build = new File(testParent, "build") - val bin = new File(testParent, "bin") + // in case of an installed dist, testRootFile is one level deeper + val bin = new File(testParent.getParentFile, "bin") if (dists.isDirectory) { NestUI.verbose("Running on DISTRIBUTION") @@ -89,7 +95,6 @@ else latestActFile = prefixFile("dists/latest/lib/scala-library.jar") latestCompFile = prefixFile("dists/latest/lib/scala-compiler.jar") latestPartestFile = prefixFile("dists/latest/lib/scala-partest.jar") - latestFjbgFile = prefixFile("lib/fjbg.jar") // starr } else if (build.isDirectory && (new File(build, "pack/lib/scala-library.jar")).exists) { NestUI.verbose("Running on SuperSABBUS PACK") @@ -98,7 +103,6 @@ else latestActFile = prefixFile("build/pack/lib/scala-library.jar") latestCompFile = prefixFile("build/pack/lib/scala-compiler.jar") latestPartestFile = prefixFile("build/pack/lib/scala-partest.jar") - latestFjbgFile = prefixFile("lib/fjbg.jar") // starr } else if (build.isDirectory) { NestUI.verbose("Running on SABBUS QUICK") @@ -107,15 +111,15 @@ else latestActFile = prefixFile("build/quick/lib/actors") latestCompFile = prefixFile("build/quick/lib/compiler") latestPartestFile = prefixFile("build/quick/lib/partest") - latestFjbgFile = prefixFile("lib/fjbg.jar") // starr } else if (bin.isDirectory) { NestUI.verbose("Running on INSTALLED DIST") - latestFile = prefixFile("bin") - latestLibFile = prefixFile("lib/scala-library.jar") - latestActFile = prefixFile("lib/scala-library.jar") - latestCompFile = prefixFile("lib/scala-compiler.jar") - latestPartestFile = prefixFile("lib/scala-partest.jar") + val p = testParent.getParentFile + latestFile = prefixFileWith(p, "bin") + latestLibFile = prefixFileWith(p, "lib/scala-library.jar") + latestActFile = prefixFileWith(p, "lib/scala-library.jar") + latestCompFile = prefixFileWith(p, "lib/scala-compiler.jar") + latestPartestFile = prefixFileWith(p, "lib/scala-partest.jar") } else error("Scala binaries could not be found") @@ -152,7 +156,6 @@ else var latestActFile: File = _ var latestCompFile: File = _ var latestPartestFile: File = _ - var latestFjbgFile: File = _ // initialize above fields findLatest() diff --git a/src/partest/scala/tools/partest/nest/ReflectiveRunner.scala b/src/partest/scala/tools/partest/nest/ReflectiveRunner.scala index b08988e2af..f7476d2772 100644 --- a/src/partest/scala/tools/partest/nest/ReflectiveRunner.scala +++ b/src/partest/scala/tools/partest/nest/ReflectiveRunner.scala @@ -22,11 +22,10 @@ class ReflectiveRunner { val fileManager = new ConsoleFileManager import fileManager.{latestCompFile, latestLibFile, latestActFile, - latestPartestFile, latestFjbgFile} + latestPartestFile} val sepUrls = Array(latestCompFile.toURL, latestLibFile.toURL, - latestActFile.toURL, latestPartestFile.toURL, - latestFjbgFile.toURL) + latestActFile.toURL, latestPartestFile.toURL) val sepLoader = new java.net.URLClassLoader(sepUrls, null) if (fileManager.debug) { diff --git a/src/partest/scala/tools/partest/nest/Worker.scala b/src/partest/scala/tools/partest/nest/Worker.scala index 68ff696c6f..983cc0c2c4 100644 --- a/src/partest/scala/tools/partest/nest/Worker.scala +++ b/src/partest/scala/tools/partest/nest/Worker.scala @@ -104,14 +104,13 @@ class Worker(val fileManager: FileManager) extends Actor { def execTestObjectRunner(file: File, outDir: File, logFile: File) { val consFM = new ConsoleFileManager import consFM.{latestCompFile, latestLibFile, latestActFile, - latestPartestFile, latestFjbgFile} + latestPartestFile} val classpath: List[URL] = outDir.toURL :: //List(file.getParentFile.toURL) ::: List(latestCompFile.toURL, latestLibFile.toURL, - latestActFile.toURL, latestPartestFile.toURL, - latestFjbgFile.toURL) ::: + latestActFile.toURL, latestPartestFile.toURL) ::: (List.fromString(CLASSPATH, File.pathSeparatorChar) map { x => (new File(x)).toURL }) NestUI.verbose("ObjectRunner classpath: "+classpath) -- cgit v1.2.3