- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Partest doesn't keep output directories
Mon, 2011-05-30, 16:43
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
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