From daad0985ca2126adc3762633db17133e58eb1499 Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Fri, 27 May 2016 11:26:16 -0400 Subject: [PATCH] nitunit: remove the working directory on success Signed-off-by: Jean Privat --- share/man/nitunit.md | 3 +++ src/nitunit.nit | 3 +++ 2 files changed, 6 insertions(+) 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 -- 1.7.9.5