summaryrefslogtreecommitdiff
path: root/src/partest
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2010-02-22 00:16:03 +0000
committerPaul Phillips <paulp@improving.org>2010-02-22 00:16:03 +0000
commit6e061d6f2597a3e4bdc7fcf192abbdb419917b70 (patch)
treea1ec1f729ad5f548c4a18cdd4647bc6d0b181380 /src/partest
parent91cdb1531656d9240e9ee64509ab528d727d1b51 (diff)
downloadscala-6e061d6f2597a3e4bdc7fcf192abbdb419917b70.tar.gz
scala-6e061d6f2597a3e4bdc7fcf192abbdb419917b70.tar.bz2
scala-6e061d6f2597a3e4bdc7fcf192abbdb419917b70.zip
Some deprecation patrol and minor cleanups.
Diffstat (limited to 'src/partest')
-rw-r--r--src/partest/scala/tools/partest/nest/DirectRunner.scala8
-rw-r--r--src/partest/scala/tools/partest/nest/FileManager.scala9
-rw-r--r--src/partest/scala/tools/partest/nest/Worker.scala2
3 files changed, 7 insertions, 12 deletions
diff --git a/src/partest/scala/tools/partest/nest/DirectRunner.scala b/src/partest/scala/tools/partest/nest/DirectRunner.scala
index 0853a9a84b..3778a927df 100644
--- a/src/partest/scala/tools/partest/nest/DirectRunner.scala
+++ b/src/partest/scala/tools/partest/nest/DirectRunner.scala
@@ -57,13 +57,13 @@ trait DirectRunner {
workers foreach { w =>
receiveWithin(3600 * 1000) {
case Results(res, logs, outdirs) =>
- logsToDelete = logsToDelete ::: logs.filter(_.toDelete)
- outdirsToDelete = outdirsToDelete ::: outdirs
- results = results ++ res
+ logsToDelete :::= logs filter (_.toDelete)
+ outdirsToDelete :::= outdirs
+ results ++= res
case TIMEOUT =>
// add at least one failure
NestUI.verbose("worker timed out; adding failed test")
- results = results + ("worker timed out; adding failed test" -> 2)
+ results += ("worker timed out; adding failed test" -> 2)
}
}
if (!isPartestDebug) {
diff --git a/src/partest/scala/tools/partest/nest/FileManager.scala b/src/partest/scala/tools/partest/nest/FileManager.scala
index df7a8e129c..ffeba6bbe3 100644
--- a/src/partest/scala/tools/partest/nest/FileManager.scala
+++ b/src/partest/scala/tools/partest/nest/FileManager.scala
@@ -12,16 +12,11 @@ import java.io.{File, FilenameFilter, IOException, StringWriter,
FileInputStream, FileOutputStream, BufferedReader,
FileReader, PrintWriter, FileWriter}
import java.net.URI
-import scala.tools.nsc.io.Directory
+import scala.tools.nsc.io.{ Path, Directory }
trait FileManager {
- def basename(name: String): String = {
- val inx = name.lastIndexOf(".")
- if (inx < 0) name else name.substring(0, inx)
- }
-
- def deleteRecursive(dir: File) { Directory(dir).deleteRecursively() }
+ def basename(name: String): String = Path(name).stripExtension
/**
* Compares two files using a Java implementation of the GNU diff
diff --git a/src/partest/scala/tools/partest/nest/Worker.scala b/src/partest/scala/tools/partest/nest/Worker.scala
index 9d990ef1ac..7a947b3298 100644
--- a/src/partest/scala/tools/partest/nest/Worker.scala
+++ b/src/partest/scala/tools/partest/nest/Worker.scala
@@ -973,7 +973,7 @@ class Worker(val fileManager: FileManager) extends Actor {
try {
// delete log file only if test was successful
- if (good && !logFile.isEmpty)
+ if (good && !logFile.isEmpty && !isPartestDebug)
logFile.get.toDelete = true
writers match {