diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2013-01-12 00:54:44 +0100 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2013-01-12 09:23:37 +0100 |
commit | b61a64ddb5700b5d77295df43af0e3feb3c46ac6 (patch) | |
tree | 39ffbf990bf045a5f064228dbe27ab16e4060cbd /src/partest | |
parent | 64ec51b31f9563580e250ac45714b9d3d86abde1 (diff) | |
download | scala-b61a64ddb5700b5d77295df43af0e3feb3c46ac6.tar.gz scala-b61a64ddb5700b5d77295df43af0e3feb3c46ac6.tar.bz2 scala-b61a64ddb5700b5d77295df43af0e3feb3c46ac6.zip |
SI-6964 Remove build managers, both simple and refined.
Deprecated in 2.10.0, out to pasture in 2.11.0.
Users are advised to migrate to:
https://github.com/typesafehub/zinc
http://www.scala-sbt.org/
Diffstat (limited to 'src/partest')
-rw-r--r-- | src/partest/README | 1 | ||||
-rw-r--r-- | src/partest/scala/tools/partest/PartestTask.scala | 8 | ||||
-rw-r--r-- | src/partest/scala/tools/partest/nest/ConsoleRunner.scala | 1 | ||||
-rw-r--r-- | src/partest/scala/tools/partest/nest/NestUI.scala | 1 | ||||
-rw-r--r-- | src/partest/scala/tools/partest/nest/RunnerManager.scala | 116 | ||||
-rw-r--r-- | src/partest/scala/tools/partest/nest/TestFile.scala | 1 |
6 files changed, 0 insertions, 128 deletions
diff --git a/src/partest/README b/src/partest/README index 0434aa7499..17594dbb1e 100644 --- a/src/partest/README +++ b/src/partest/README @@ -24,7 +24,6 @@ Other arguments: * --run next files test the interpreter and all backends * --jvm next files test the JVM backend * --res next files test the resident compiler - * --buildmanager next files test the build manager * --shootout next files are shootout tests * --script next files test the script runner * ''-Dpartest.scalac_opts=...'' -> add compiler options diff --git a/src/partest/scala/tools/partest/PartestTask.scala b/src/partest/scala/tools/partest/PartestTask.scala index 41d69a5448..d320f20616 100644 --- a/src/partest/scala/tools/partest/PartestTask.scala +++ b/src/partest/scala/tools/partest/PartestTask.scala @@ -43,7 +43,6 @@ import org.apache.tools.ant.types.Commandline.Argument * - `runtests`, * - `jvmtests`, * - `residenttests`, - * - `buildmanagertests`, * - `shootouttests`, * - `scalaptests`, * - `scalachecktests`, @@ -76,10 +75,6 @@ class PartestTask extends Task with CompilationPathProperty { residentFiles = Some(input) } - def addConfiguredBuildManagerTests(input: FileSet) { - buildManagerFiles = Some(input) - } - def addConfiguredScalacheckTests(input: FileSet) { scalacheckFiles = Some(input) } @@ -187,7 +182,6 @@ class PartestTask extends Task with CompilationPathProperty { private var runFiles: Option[FileSet] = None private var jvmFiles: Option[FileSet] = None private var residentFiles: Option[FileSet] = None - private var buildManagerFiles: Option[FileSet] = None private var scalacheckFiles: Option[FileSet] = None private var scriptFiles: Option[FileSet] = None private var shootoutFiles: Option[FileSet] = None @@ -244,7 +238,6 @@ class PartestTask extends Task with CompilationPathProperty { private def getRunFiles = getFilesAndDirs(runFiles) private def getJvmFiles = getFilesAndDirs(jvmFiles) private def getResidentFiles = getFiles(residentFiles) - private def getBuildManagerFiles = getFilesAndDirs(buildManagerFiles) private def getScalacheckFiles = getFilesAndDirs(scalacheckFiles) private def getScriptFiles = getFiles(scriptFiles) private def getShootoutFiles = getFiles(shootoutFiles) @@ -363,7 +356,6 @@ class PartestTask extends Task with CompilationPathProperty { (getRunFiles, "run", "Compiling and running files"), (getJvmFiles, "jvm", "Compiling and running files"), (getResidentFiles, "res", "Running resident compiler scenarii"), - (getBuildManagerFiles, "buildmanager", "Running Build Manager scenarii"), (getScalacheckFiles, "scalacheck", "Running scalacheck tests"), (getScriptFiles, "script", "Running script files"), (getShootoutFiles, "shootout", "Running shootout tests"), diff --git a/src/partest/scala/tools/partest/nest/ConsoleRunner.scala b/src/partest/scala/tools/partest/nest/ConsoleRunner.scala index d146618d0e..6a24926b14 100644 --- a/src/partest/scala/tools/partest/nest/ConsoleRunner.scala +++ b/src/partest/scala/tools/partest/nest/ConsoleRunner.scala @@ -31,7 +31,6 @@ class ConsoleRunner extends DirectRunner { TestSet("run", stdFilter, "Testing interpreter and backend"), TestSet("jvm", stdFilter, "Testing JVM backend"), TestSet("res", x => x.isFile && (x hasExtension "res"), "Testing resident compiler"), - TestSet("buildmanager", _.isDirectory, "Testing Build Manager"), TestSet("shootout", stdFilter, "Testing shootout tests"), TestSet("script", stdFilter, "Testing script tests"), TestSet("scalacheck", stdFilter, "Testing ScalaCheck tests"), diff --git a/src/partest/scala/tools/partest/nest/NestUI.scala b/src/partest/scala/tools/partest/nest/NestUI.scala index ab90d387d0..df90b22448 100644 --- a/src/partest/scala/tools/partest/nest/NestUI.scala +++ b/src/partest/scala/tools/partest/nest/NestUI.scala @@ -73,7 +73,6 @@ object NestUI { println(" --run run interpreter and backend tests") println(" --jvm run JVM backend tests") println(" --res run resident compiler tests") - println(" --buildmanager run Build Manager tests") println(" --scalacheck run ScalaCheck tests") println(" --script run script runner tests") println(" --shootout run shootout tests") diff --git a/src/partest/scala/tools/partest/nest/RunnerManager.scala b/src/partest/scala/tools/partest/nest/RunnerManager.scala index fbef97dab4..0ed14dc858 100644 --- a/src/partest/scala/tools/partest/nest/RunnerManager.scala +++ b/src/partest/scala/tools/partest/nest/RunnerManager.scala @@ -19,7 +19,6 @@ import scala.tools.nsc.util.{ ClassPath, FakePos, ScalaClassLoader, stackTraceSt import ClassPath.{ join, split } import scala.tools.scalap.scalax.rules.scalasig.ByteCode import scala.collection.{ mutable, immutable } -import scala.tools.nsc.interactive.{ BuildManager, RefinedBuildManager } import scala.sys.process._ import java.util.concurrent.{ Executors, TimeUnit, TimeoutException } import PartestDefaults.{ javaCmd, javacCmd } @@ -530,121 +529,6 @@ class RunnerManager(kind: String, val fileManager: FileManager, params: TestRunP case "ant" => runAntTest(file) - case "buildmanager" => - val (swr, wr) = newTestWriters() - printInfoStart(file, wr) - val (outDir, testFile, changesDir) = { - if (!file.isDirectory) - (null, null, null) - else { - NestUI.verbose(this+" running test "+fileBase) - val outDir = createOutputDir() - val testFile = new File(file, fileBase + ".test") - val changesDir = new File(file, fileBase + ".changes") - - if (changesDir.isFile || !testFile.isFile) { - // if changes exists then it has to be a dir - if (!testFile.isFile) NestUI.verbose("invalid build manager test file") - if (changesDir.isFile) NestUI.verbose("invalid build manager changes directory") - (null, null, null) - } - else { - copyTestFiles(file, outDir) - NestUI.verbose("outDir: "+outDir) - NestUI.verbose("logFile: "+logFile) - (outDir, testFile, changesDir) - } - } - } - if (outDir == null) - return (false, LogContext(logFile)) - - // Pre-conditions satisfied - val sourcepath = outDir.getAbsolutePath+File.separator - - // configure input/output files - val logWriter = new PrintStream(new FileOutputStream(logFile), true) - val testReader = new BufferedReader(new FileReader(testFile)) - val logConsoleWriter = new PrintWriter(logWriter, true) - - // create proper settings for the compiler - val settings = new Settings(workerError) - settings.outdir.value = outDir.getAbsoluteFile.getAbsolutePath - settings.sourcepath.value = sourcepath - settings.classpath.value = fileManager.CLASSPATH - settings.Ybuildmanagerdebug.value = true - - // simulate Build Manager loop - val prompt = "builder > " - val reporter = new ConsoleReporter(settings, scala.Console.in, logConsoleWriter) - val bM: BuildManager = - new RefinedBuildManager(settings) { - override protected def newCompiler(settings: Settings) = - new BuilderGlobal(settings, reporter) - } - - def testCompile(line: String): Boolean = { - NestUI.verbose("compiling " + line) - val args = (line split ' ').toList - val command = new CompilerCommand(args, settings) - command.ok && { - bM.update(filesToSet(settings.sourcepath.value, command.files), Set.empty) - !reporter.hasErrors - } - } - - val updateFiles = (line: String) => { - NestUI.verbose("updating " + line) - (line split ' ').toList forall (u => - (u split "=>").toList match { - case origFileName::(newFileName::Nil) => - val newFile = new File(changesDir, newFileName) - if (newFile.isFile) { - val v = overwriteFileWith(new File(outDir, origFileName), newFile) - if (!v) - NestUI.verbose("'update' operation on " + u + " failed") - v - } else { - NestUI.verbose("File " + newFile + " is invalid") - false - } - case a => - NestUI.verbose("Other =: " + a) - false - } - ) - } - - def loop(): Boolean = { - testReader.readLine() match { - case null | "" => - NestUI.verbose("finished") - true - case s if s startsWith ">>update " => - updateFiles(s stripPrefix ">>update ") && loop() - case s if s startsWith ">>compile " => - val files = s stripPrefix ">>compile " - logWriter.println(prompt + files) - // In the end, it can finish with an error - if (testCompile(files)) loop() - else { - val t = testReader.readLine() - (t == null) || (t == "") - } - case s => - NestUI.verbose("wrong command in test file: " + s) - false - } - } - - Output.withRedirected(logWriter) { - try loop() - finally testReader.close() - } - fileManager.mapFile(logFile, replaceSlashes(new File(sourcepath), _)) - - (diffCheck(file, compareOutput(file, logFile)), LogContext(logFile, swr, wr)) - case "res" => { // simulate resident compiler loop val prompt = "\nnsc> " diff --git a/src/partest/scala/tools/partest/nest/TestFile.scala b/src/partest/scala/tools/partest/nest/TestFile.scala index 87177772ab..880c6e431b 100644 --- a/src/partest/scala/tools/partest/nest/TestFile.scala +++ b/src/partest/scala/tools/partest/nest/TestFile.scala @@ -54,7 +54,6 @@ abstract class TestFile(val kind: String) extends TestFileCommon { case class PosTestFile(file: JFile, fileManager: FileManager) extends TestFile("pos") case class NegTestFile(file: JFile, fileManager: FileManager) extends TestFile("neg") case class RunTestFile(file: JFile, fileManager: FileManager) extends TestFile("run") -case class BuildManagerTestFile(file: JFile, fileManager: FileManager) extends TestFile("bm") case class ScalaCheckTestFile(file: JFile, fileManager: FileManager) extends TestFile("scalacheck") case class JvmTestFile(file: JFile, fileManager: FileManager) extends TestFile("jvm") case class ShootoutTestFile(file: JFile, fileManager: FileManager) extends TestFile("shootout") { |