summaryrefslogtreecommitdiff
path: root/python/subunit/_output.py
diff options
context:
space:
mode:
authorThomi Richards <thomi.richards@canonical.com>2013-11-19 12:34:53 +1300
committerThomi Richards <thomi.richards@canonical.com>2013-11-19 12:34:53 +1300
commit78a8d097a53203d717a653fe3184874bc988660f (patch)
tree53127250ee8c529ca87ba7e78111a36f350a901e /python/subunit/_output.py
parente30001daaf6ce2ee233ce856a87df4d16b389062 (diff)
downloadsubunit-git-78a8d097a53203d717a653fe3184874bc988660f.tar.gz
Add support for tags.
Diffstat (limited to 'python/subunit/_output.py')
-rw-r--r--python/subunit/_output.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/python/subunit/_output.py b/python/subunit/_output.py
index 4bd93d1..788a19f 100644
--- a/python/subunit/_output.py
+++ b/python/subunit/_output.py
@@ -17,6 +17,7 @@ from argparse import ArgumentParser
import datetime
from functools import partial
from sys import stdout
+from string import split
from subunit.v2 import StreamResultToBytes
@@ -59,6 +60,12 @@ def parse_arguments(args=None, ParserClass=ArgumentParser):
"not specified, the file will be sent wihtout a mime type.",
default=None
)
+ common_args.add_argument(
+ "--tags",
+ help="A comma-separated list of tags to associate with this test.",
+ type=partial(split, sep=','),
+ default=None
+ )
sub_parsers = parser.add_subparsers(dest="action")
final_state = "This is a final action: No more actions may be generated " \
@@ -124,7 +131,8 @@ def generate_bytestream(args, output_writer):
output_writer.status(
test_id=args.test_id,
test_status=translate_command_name(args.action),
- timestamp=create_timestamp()
+ timestamp=create_timestamp(),
+ test_tags=args.tags,
)
output_writer.stopTestRun()