diff options
author | Lukas Rytz <lukas.rytz@epfl.ch> | 2008-05-07 16:31:46 +0000 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@epfl.ch> | 2008-05-07 16:31:46 +0000 |
commit | 525aef50a257c483f87f434d79df3fb7a5144a51 (patch) | |
tree | a219e6ad3fa68b9717075037e95ac9fb6d8e9a91 | |
parent | b57e67b8a104028fc6f5a907ad2e95f97575350a (diff) | |
download | scala-525aef50a257c483f87f434d79df3fb7a5144a51.tar.gz scala-525aef50a257c483f87f434d79df3fb7a5144a51.tar.bz2 scala-525aef50a257c483f87f434d79df3fb7a5144a51.zip |
- 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.
-rw-r--r-- | src/build/pack.xml | 2 | ||||
-rw-r--r-- | src/partest/scala/tools/partest/nest/CompileManager.scala | 5 | ||||
-rw-r--r-- | src/partest/scala/tools/partest/nest/ConsoleFileManager.scala | 27 | ||||
-rw-r--r-- | src/partest/scala/tools/partest/nest/ReflectiveRunner.scala | 5 | ||||
-rw-r--r-- | src/partest/scala/tools/partest/nest/Worker.scala | 5 | ||||
-rwxr-xr-x | test/partest | 6 | ||||
-rwxr-xr-x | test/partest.bat | 6 |
7 files changed, 28 insertions, 28 deletions
diff --git a/src/build/pack.xml b/src/build/pack.xml index 456bd60344..de0aee7b0b 100644 --- a/src/build/pack.xml +++ b/src/build/pack.xml @@ -104,7 +104,7 @@ MAIN DISTRIBUTION SBAZ desc="The Scala test package contains everything needed to test Scala." link="${sbaz.universe}/scala-test-${version.number}.sbp"> <binset dir="${basedir}/test" - includes="clitest,diff/diff.*,diff/lib*.dll,scalatest,scalatest.bat,partest"/> + includes="clitest,diff/diff.*,diff/lib*.dll,scalatest,scalatest.bat,partest,partest.bat"/> <miscset dir="${basedir}/test" includes="files/**/*.args,files/**/*.check,files/**/*.jar,files/**/*.java,files/**/*.scala,files/cli/**/*.check.*,files/jvm/*.so,files/shootout/*.javaopts,files/shootout/*.runner,files/shootout/*.txt"/> <!-- <srcset dir="${dist.dir}/src" includes="scala-partest-src.jar"/> --> 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) diff --git a/test/partest b/test/partest index 9a72e5e232..6c7d22995e 100755 --- a/test/partest +++ b/test/partest @@ -48,9 +48,9 @@ if [ -z "$EXT_CLASSPATH" ] ; then EXT_CLASSPATH="$EXT_CLASSPATH:$ext" fi done - elif [ -d "$SCALA_HOME/build/quick/lib/partest" ] ; then - for lib in `echo "partest library compiler actors fjbg.jar"`; do - ext="$SCALA_HOME/build/quick/lib/$lib" + elif [ -f "$SCALA_HOME/build/pack/lib/scala-partest.jar" ] ; then + for lib in `echo "partest library compiler"`; do + ext="$SCALA_HOME/build/pack/lib/scala-$lib.jar" if [ -z "$EXT_CLASSPATH" ] ; then EXT_CLASSPATH="$ext" else diff --git a/test/partest.bat b/test/partest.bat index a618b67209..8b01e03c7f 100755 --- a/test/partest.bat +++ b/test/partest.bat @@ -45,10 +45,10 @@ if "%_EXTENSION_CLASSPATH%"=="" ( if "%OS%"=="Windows_NT" (
for /d %%f in ("%_SCALA_HOME%\lib\*") do call :add_cpath "%%f"
)
- ) else if exist "%_SCALA_HOME%\build\quick\lib\partest" (
- for %%f in ("%_SCALA_HOME%\build\quick\lib\*") do call :add_cpath "%%f"
+ ) else if exist "%_SCALA_HOME%\build\pack\lib\scala-partest.jar" (
+ for %%f in ("%_SCALA_HOME%\build\pack\lib\*") do call :add_cpath "%%f"
if "%OS%"=="Windows_NT" (
- for /d %%f in ("%_SCALA_HOME%\build\quick\lib\*") do call :add_cpath "%%f"
+ for /d %%f in ("%_SCALA_HOME%\build\pack\lib\*") do call :add_cpath "%%f"
)
)
)
|