Additional Unit Tests for core modules
[functest.git] / functest / ci / tier_handler.py
old mode 100755 (executable)
new mode 100644 (file)
index 127986b..fe7372a
@@ -104,12 +104,18 @@ class Tier(object):
 
 class TestCase(object):
 
-    def __init__(self, name, dependency, criteria, blocking, description=""):
+    def __init__(self, name,
+                 dependency,
+                 criteria,
+                 blocking,
+                 clean_flag,
+                 description=""):
         self.name = name
         self.dependency = dependency
-        self.description = description
         self.criteria = criteria
         self.blocking = blocking
+        self.clean_flag = clean_flag
+        self.description = description
 
     @staticmethod
     def is_none(item):
@@ -138,6 +144,9 @@ class TestCase(object):
     def is_blocking(self):
         return self.blocking
 
+    def needs_clean(self):
+        return self.clean_flag
+
     def __str__(self):
         lines = split_text(self.description, LINE_LENGTH - 6)
 
@@ -149,7 +158,7 @@ class TestCase(object):
         for line in lines:
             out += ("|    " + line.ljust(LINE_LENGTH - 7) + " |\n")
         out += ("| Criteria:  " +
-                self.criteria.ljust(LINE_LENGTH - 14) + "|\n")
+                str(self.criteria).ljust(LINE_LENGTH - 14) + "|\n")
         out += ("| Dependencies:".ljust(LINE_LENGTH - 1) + "|\n")
         installer = self.dependency.get_installer()
         scenario = self.dependency.get_scenario()