about summary refs log tree commit diff stats
path: root/test/utils
diff options
context:
space:
mode:
authorAjax <commial@gmail.com>2015-04-02 13:12:25 +0200
committerAjax <commial@gmail.com>2015-04-02 13:12:25 +0200
commitecf1063ace17a55b49bf8abb40b79f7c640f017d (patch)
tree2a426e0632625c99e22d002bfc65dd973205555b /test/utils
parent466d3bcb9ec045e35d827cb26fbee52b77fad069 (diff)
downloadmiasm-ecf1063ace17a55b49bf8abb40b79f7c640f017d.tar.gz
miasm-ecf1063ace17a55b49bf8abb40b79f7c640f017d.zip
TestAll: Add a "do-not-clean" option
Diffstat (limited to 'test/utils')
-rw-r--r--test/utils/testset.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/test/utils/testset.py b/test/utils/testset.py
index 92b5dfb0..97ebeb3d 100644
--- a/test/utils/testset.py
+++ b/test/utils/testset.py
@@ -208,7 +208,7 @@ class TestSet(object):
         "Launch tests"
 
         # Go in the right directory
-        current_directory = os.getcwd()
+        self.current_directory = os.getcwd()
         os.chdir(self.base_dir)
 
         # Launch workers
@@ -237,11 +237,17 @@ class TestSet(object):
         for p in processes:
             p.join()
 
+    def end(self, clean=True):
+        """End a testset run
+        @clean: (optional) if set, remove tests products
+        PRE: run()
+        """
         # Clean
-        self._clean()
+        if clean:
+            self._clean()
 
         # Restore directory
-        os.chdir(current_directory)
+        os.chdir(self.current_directory)
 
     def tests_passed(self):
         "Return a non zero value if at least one test failed"