about summary refs log tree commit diff stats
path: root/test/utils
diff options
context:
space:
mode:
authorCamille Mougey <camille.mougey@cea.fr>2014-11-03 15:52:30 +0100
committerCamille Mougey <camille.mougey@cea.fr>2014-11-03 15:52:30 +0100
commitf1890f99e596bda6647705a6c4da81d12a7d766c (patch)
treed52ef0c06b7fe41563f085e6a404902debc7cf33 /test/utils
parentb4745bf9980db9aee566a16f3725a9bd2d887860 (diff)
downloadfocaccia-miasm-f1890f99e596bda6647705a6c4da81d12a7d766c.tar.gz
focaccia-miasm-f1890f99e596bda6647705a6c4da81d12a7d766c.zip
Test/Utils: Add "tags" attribute to tag test units
Diffstat (limited to 'test/utils')
-rw-r--r--test/utils/test.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/utils/test.py b/test/utils/test.py
index 1caf1013..e4f8888c 100644
--- a/test/utils/test.py
+++ b/test/utils/test.py
@@ -2,20 +2,22 @@ class Test(object):
     "Stand for a test to run"
 
     def __init__(self, command_line, base_dir="", depends=None,
-                 products=None):
+                 products=None, tags=None):
         """Create a Test instance.
         @command_line: list of string standing for arguments to launch
         @base_dir: base directory for launch
         @depends: list of Test instance indicating dependencies
         @products: elements produced to remove after tests
+        @tags: list of str indicating current test categories
         """
         self.command_line = command_line
         self.base_dir = base_dir
         self.depends = depends if depends else []
         self.products = products if products else []
+        self.tags = tags if tags else []
 
     def __repr__(self):
-        displayed = ["command_line", "base_dir", "depends", "products"]
+        displayed = ["command_line", "base_dir", "depends", "products", "tags"]
         return "<Test " + \
             " ".join("%s=%s" % (n, getattr(self,n)) for n in displayed ) + ">"
 
@@ -26,4 +28,5 @@ class Test(object):
         return all([self.command_line == test.command_line,
                     self.base_dir == test.base_dir,
                     self.depends == test.depends,
-                    self.products == test.products])
+                    self.products == test.products,
+                    self.tags == test.tags])