From 10830eaae2955766378369b8d1bcc0e6963b9b7f Mon Sep 17 00:00:00 2001 From: Antonio Cunei Date: Fri, 15 May 2009 15:44:54 +0000 Subject: 1.4-related cleanup and reorganization. Removed a bunch of now useless 1.4 code, merged back jvm5-specific partest tests into the general jvm tests, documentation updates. --- src/manual/scala/man1/scalac.scala | 2 +- src/partest/README | 6 +----- src/partest/scala/tools/partest/PartestTask.scala | 13 ------------- src/partest/scala/tools/partest/nest/CompileManager.scala | 1 - src/partest/scala/tools/partest/nest/ConsoleRunner.scala | 12 ++---------- src/partest/scala/tools/partest/nest/NestUI.scala | 2 -- src/partest/scala/tools/partest/nest/ReflectiveRunner.scala | 2 -- src/partest/scala/tools/partest/nest/TestFile.scala | 9 --------- src/partest/scala/tools/partest/nest/Worker.scala | 3 --- src/scala-lang.iml | 1 - 10 files changed, 4 insertions(+), 47 deletions(-) (limited to 'src') diff --git a/src/manual/scala/man1/scalac.scala b/src/manual/scala/man1/scalac.scala index af23aa41e8..421df1b745 100644 --- a/src/manual/scala/man1/scalac.scala +++ b/src/manual/scala/man1/scalac.scala @@ -125,7 +125,7 @@ object scalac extends Command { Definition( CmdOption("target:", Argument("target")), SeqPara( - "Specify which backend to use (" & Mono("jvm-1.5,jvm-1.4," & + "Specify which backend to use (" & Mono("jvm-1.5," & "msil,cldc") & ").", "The default value is " & Mono("\"jvm-1.5\"") & " (was " & Mono("\"jvm-1.4\"") & " up to Scala version 2.6.1).")), diff --git a/src/partest/README b/src/partest/README index 906439793a..430a2987f8 100644 --- a/src/partest/README +++ b/src/partest/README @@ -4,9 +4,6 @@ How partest choses the compiler / library: ''lib'' directory of given path * ''--pack'' -> will set ''scalatest.build=build/pack'', and run all tests. add ''--[kind]'' to run a selected set of tests. - * ''--[four]'' -> will set ''scalatest.build=build-four-pack'' and - ''scalatest.scalac_opts=-target:jvm-1.4'', and run all tests. - add ''--kind'' to run a selected set of tests. * auto detection: - scalatest.build property -> ''bin'' / ''lib'' directories - distribution (''dists/latest'') @@ -26,10 +23,9 @@ Other arguments: * --neg next files test a compilation failure * --run next files test the interpreter and all backends * --jvm next files test the JVM backend - * --jvm5 next files test the JVM backend * --res next files test the resident compiler * --shootout next files are shootout tests * --script next files test the script runner - * ''-Dscalatest.scalac_opts=-target:jvm-1.4'' -> add compiler options + * ''-Dscalatest.scalac_opts=...'' -> add compiler options * ''--verbose'' -> print verbose messages * ''-Dpartest.debug=true'' -> print debug messages diff --git a/src/partest/scala/tools/partest/PartestTask.scala b/src/partest/scala/tools/partest/PartestTask.scala index 90073db13d..7ad64f6e0d 100644 --- a/src/partest/scala/tools/partest/PartestTask.scala +++ b/src/partest/scala/tools/partest/PartestTask.scala @@ -40,10 +40,6 @@ class PartestTask extends Task { jvmFiles = Some(input) } - def addConfiguredJvm5Tests(input: FileSet) { - jvm5Files = Some(input) - } - def addConfiguredResidentTests(input: FileSet) { residentFiles = Some(input) } @@ -119,7 +115,6 @@ class PartestTask extends Task { private var negFiles: Option[FileSet] = None private var runFiles: Option[FileSet] = None private var jvmFiles: Option[FileSet] = None - private var jvm5Files: Option[FileSet] = None private var residentFiles: Option[FileSet] = None private var scriptFiles: Option[FileSet] = None private var shootoutFiles: Option[FileSet] = None @@ -159,7 +154,6 @@ class PartestTask extends Task { private def getNegFiles = getFiles(negFiles) private def getRunFiles = getFiles(runFiles) private def getJvmFiles = getFilesAndDirs(jvmFiles) - private def getJvm5Files = getFilesAndDirs(jvm5Files) private def getResidentFiles = getFiles(residentFiles) private def getScriptFiles = getFiles(scriptFiles) private def getShootoutFiles = getFiles(shootoutFiles) @@ -263,13 +257,6 @@ class PartestTask extends Task { allFailures += failures } - if (getJvm5Files.size > 0) { - log("Compiling and running files") - val (successes, failures) = runTestsForFiles(getJvm5Files, "jvm5") - allSucesses += successes - allFailures += failures - } - if (getResidentFiles.size > 0) { log("Running resident compiler scenarii") val (successes, failures) = runTestsForFiles(getResidentFiles, "res") diff --git a/src/partest/scala/tools/partest/nest/CompileManager.scala b/src/partest/scala/tools/partest/nest/CompileManager.scala index 0f21efc346..d33eee1ccd 100644 --- a/src/partest/scala/tools/partest/nest/CompileManager.scala +++ b/src/partest/scala/tools/partest/nest/CompileManager.scala @@ -103,7 +103,6 @@ class DirectCompiler(val fileManager: FileManager) extends SimpleCompiler { case "neg" => NegTestFile(files(0), fileManager, out.isEmpty) case "run" => RunTestFile(files(0), fileManager, out.isEmpty) case "jvm" => JvmTestFile(files(0), fileManager, out.isEmpty) - case "jvm5" => Jvm5TestFile(files(0), fileManager, out.isEmpty) case "shootout" => ShootoutTestFile(files(0), fileManager, out.isEmpty) case "scalap" => ScalapTestFile(files(0), fileManager, out.isEmpty) case "scalacheck" => diff --git a/src/partest/scala/tools/partest/nest/ConsoleRunner.scala b/src/partest/scala/tools/partest/nest/ConsoleRunner.scala index 67053ce732..513aee5350 100644 --- a/src/partest/scala/tools/partest/nest/ConsoleRunner.scala +++ b/src/partest/scala/tools/partest/nest/ConsoleRunner.scala @@ -29,7 +29,6 @@ class ConsoleRunner extends DirectRunner with RunnerUtils { "Testing compiler (on files whose compilation should fail)"), TestSet("run", fileFilter, "run", "Testing JVM backend"), TestSet("jvm", fileFilter, "jvm", "Testing JVM backend"), - TestSet("jvm5", fileFilter, "jvm5", "Testing JVM backend"), TestSet("res", Some((".res", false)), "res", "Testing resident compiler"), TestSet("shootout", fileFilter, "shootout", "Testing shootout tests"), @@ -80,9 +79,6 @@ class ConsoleRunner extends DirectRunner with RunnerUtils { else if (args contains "--pack") { args = args.remove(_ == "--pack") // will create a result file '--pack' otherwise new ConsoleFileManager("build/pack") - } else if (args contains "--four") { - args = args.remove(_ == "--four") - new ConsoleFileManager("build/four-pack", false, "-target:jvm-1.4") } else // auto detection, see ConsoleFileManager.findLatest new ConsoleFileManager @@ -206,12 +202,8 @@ class ConsoleRunner extends DirectRunner with RunnerUtils { NestUI.failure("invalid test file: "+firstName+"\n") Predef.exit(1) } else { - val k = firstName.substring(filesPos+len+1, filesPos+len+1+3) - val short = if (k == "jvm") { - if (firstName.substring(filesPos+len+1, filesPos+len+1+4) == "jvm5") "jvm5" - else k - } else k - val shortKinds = List("pos", "neg", "run", "jvm", "jvm5", "res") + val short = firstName.substring(filesPos+len+1, filesPos+len+1+3) + val shortKinds = List("pos", "neg", "run", "jvm", "res") if (shortKinds contains short) short else short match { case "sho" => "shootout" diff --git a/src/partest/scala/tools/partest/nest/NestUI.scala b/src/partest/scala/tools/partest/nest/NestUI.scala index b6a8ec0253..ad9111d3a9 100644 --- a/src/partest/scala/tools/partest/nest/NestUI.scala +++ b/src/partest/scala/tools/partest/nest/NestUI.scala @@ -74,14 +74,12 @@ object NestUI { println(" --neg run compilation tests (failure)") println(" --run run interpreter and backend tests") println(" --jvm run JVM backend tests") - println(" --jvm5 run JVM backend tests (-target:jvm-1.5)") println(" --res run resident compiler tests") println(" --script run script runner tests") println(" --shootout run shootout tests") println println(" Other options:") println(" --pack pick compiler/library in build/pack, and run all tests") - println(" --four pick compiler/library in build/four-pack, and run all tests") println(" --show-log show log") println(" --show-diff show diff between log and check file") println(" --failed run only those tests that failed during the last run") diff --git a/src/partest/scala/tools/partest/nest/ReflectiveRunner.scala b/src/partest/scala/tools/partest/nest/ReflectiveRunner.scala index c655494d4d..76e58efb74 100644 --- a/src/partest/scala/tools/partest/nest/ReflectiveRunner.scala +++ b/src/partest/scala/tools/partest/nest/ReflectiveRunner.scala @@ -38,8 +38,6 @@ class ReflectiveRunner extends RunnerUtils { new ConsoleFileManager(classPath.get, true) else if (argList contains "--pack") new ConsoleFileManager("build/pack") - else if (argList contains "--four") - new ConsoleFileManager("build/four-pack", false, "-target:jvm-1.4") else // auto detection new ConsoleFileManager diff --git a/src/partest/scala/tools/partest/nest/TestFile.scala b/src/partest/scala/tools/partest/nest/TestFile.scala index 3d83abe176..d7ec9c64cf 100644 --- a/src/partest/scala/tools/partest/nest/TestFile.scala +++ b/src/partest/scala/tools/partest/nest/TestFile.scala @@ -89,15 +89,6 @@ case class JvmTestFile(override val file: File, override val fileManager: FileMa } } -case class Jvm5TestFile(override val file: File, override val fileManager: FileManager, createOutDir: Boolean) extends TestFile("jvm5", file, fileManager, createOutDir) { - override def defineSettings(settings: Settings) { - baseSettings(settings) - settings.classpath.value = settings.classpath.value+ - File.pathSeparator+fileManager.CLASSPATH - settings.target.value = "jvm-1.5" - } -} - case class ShootoutTestFile(override val file: File, override val fileManager: FileManager, createOutDir: Boolean) extends TestFile("shootout", file, fileManager, createOutDir) { override def defineSettings(settings: Settings) { baseSettings(settings) diff --git a/src/partest/scala/tools/partest/nest/Worker.scala b/src/partest/scala/tools/partest/nest/Worker.scala index badeae6b21..7720f40085 100644 --- a/src/partest/scala/tools/partest/nest/Worker.scala +++ b/src/partest/scala/tools/partest/nest/Worker.scala @@ -513,9 +513,6 @@ class Worker(val fileManager: FileManager) extends Actor { case "jvm" => runJvmTest(file, kind) - case "jvm5" => - runJvmTest(file, kind) - case "res" => { // when option "--failed" is provided // execute test only if log file is present diff --git a/src/scala-lang.iml b/src/scala-lang.iml index d74dfe8334..dec0e11a53 100644 --- a/src/scala-lang.iml +++ b/src/scala-lang.iml @@ -22,7 +22,6 @@ - -- cgit v1.2.3