From: Jean Privat Date: Fri, 27 May 2016 15:26:16 +0000 (-0400) Subject: nitunit: remove the working directory on success X-Git-Url: http://nitlanguage.org nitunit: remove the working directory on success Signed-off-by: Jean Privat --- diff --git a/share/man/nitunit.md b/share/man/nitunit.md index 66bf749..6f09402 100644 --- a/share/man/nitunit.md +++ b/share/man/nitunit.md @@ -272,6 +272,9 @@ Working directory (default is 'nitunit.out'). In order to execute the tests, nit files are generated then compiled and executed in the giver working directory. +In case of success, the directory is removed. +In case of failure, it is kept as is so files can be investigated. + ### `--nitc` nitc compiler to use. diff --git a/src/nitunit.nit b/src/nitunit.nit index bed744c..8d79e80 100644 --- a/src/nitunit.nit +++ b/src/nitunit.nit @@ -152,5 +152,8 @@ else end print "{head} {fail}/{total} tests failed." + print "`{test_dir}` is not removed for investigation." exit 1 end + +test_dir.rmdir