You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iota.apache.org by to...@apache.org on 2016/07/21 23:38:01 UTC
[10/10] incubator-iota git commit: Adding cleanup after all tests
executed
Adding cleanup after all tests executed
Project: http://git-wip-us.apache.org/repos/asf/incubator-iota/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-iota/commit/2acc7fc8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-iota/tree/2acc7fc8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-iota/diff/2acc7fc8
Branch: refs/heads/master
Commit: 2acc7fc8756eb8c12c6cb9e93db2424cda7c479d
Parents: b21fb6b
Author: Barbara Gomes <ba...@gmail.com>
Authored: Thu Jul 21 13:54:49 2016 -0700
Committer: Barbara Gomes <ba...@gmail.com>
Committed: Thu Jul 21 13:54:49 2016 -0700
----------------------------------------------------------------------
project/BuildSettings.scala | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-iota/blob/2acc7fc8/project/BuildSettings.scala
----------------------------------------------------------------------
diff --git a/project/BuildSettings.scala b/project/BuildSettings.scala
index 17bb264..c2013b1 100644
--- a/project/BuildSettings.scala
+++ b/project/BuildSettings.scala
@@ -63,7 +63,17 @@ object BuildSettings {
},
//All tests on Fey are integrated tests.
//All tests need to be execute sequentially
- parallelExecution in Test := false
+ parallelExecution in Test := false,
+ testOptions in Test += Tests.Cleanup( () => {
+ println("CLenning up")
+ removeAll("/tmp/fey/test")
+ def removeAll(path: String) = {
+ def getRecursively(f: File): Seq[File] =
+ f.listFiles.filter(_.isDirectory).flatMap(getRecursively) ++ f.listFiles
+ getRecursively(new File(path)).foreach{f =>
+ if (!f.delete()) println(s"could not delete ${f.getAbsolutePath}")}
+ }
+ })
)
lazy val StreambuildSettings = Defaults.coreDefaultSettings ++ Seq(