This page is no longer maintained — Please continue to the home page at www.scala-lang.org

Partest doesn't keep output directories

No replies
gkossakowski
Joined: 2010-03-11,
User offline. Last seen 33 weeks 5 days ago.
Hi,

I just upgraded to latest scala trunk after sitting in a fork for more than one year now. Thanks to Git good merge support the upgrade wasn't that painful.

However, one thing that I noticed is changed behaviour of partest when --debug flag is given. It used to keep all output directories so it was easy to inspect them and see what wrong is going on.

I cannot find any option that would bring back that behaviour. Any clues?

Here's the patch that I'm using right now:

diff --git a/src/partest/scala/tools/partest/nest/Worker.scala b/src/partest/scala/tools/partest/nest/Worker.scala
index 9e4b6c2..312065e 100644
--- a/src/partest/scala/tools/partest/nest/Worker.scala
+++ b/src/partest/scala/tools/partest/nest/Worker.scala
@@ -150,7 +150,8 @@ class Worker(val fileManager: FileManager, params: TestRunParams) extends Actor
  private def updateStatus(key: String, num: Int) = status(key) = num
 
  private def cleanup() {
-    toDelete foreach (_.deleteRecursively())
+    if (!scala.tools.partest.isPartestDebug)
+      toDelete foreach (_.deleteRecursively())
    toDelete.clear()
  }
  sys addShutdownHook cleanup()

--
Grzegorz Kossakowski

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland