@@ -57,7 +57,7 @@ def __init__(self, script, jitter ,*args, **kwargs):
5757
5858# script -> blacklisted jitter
5959blacklist = {
60- "x86/unit/mn_float.py" : ["python" ],
60+ "x86/unit/mn_float.py" : ["python" , "llvm" ],
6161}
6262for script in ["x86/sem.py" ,
6363 "x86/unit/mn_strings.py" ,
@@ -628,6 +628,9 @@ class ExampleJitterNoPython(ExampleJitter):
628628 parser .add_argument ("-t" , "--omit-tags" , help = "Omit tests based on tags \
629629 (tag1,tag2). Available tags are %s. \
630630 By default, no tag is omitted." % ", " .join (TAGS .keys ()), default = "" )
631+ parser .add_argument ("-o" , "--only-tags" , help = "Restrict to tests based on tags \
632+ (tag1,tag2). Available tags are %s. \
633+ By default, all tag are considered." % ", " .join (TAGS .keys ()), default = "" )
631634 parser .add_argument ("-n" , "--do-not-clean" ,
632635 help = "Do not clean tests products" , action = "store_true" )
633636 args = parser .parse_args ()
@@ -637,16 +640,23 @@ class ExampleJitterNoPython(ExampleJitter):
637640 if args .mono is True or args .coverage is True :
638641 multiproc = False
639642
640- ## Parse omit-tags argument
643+ ## Parse omit-tags and only-tags argument
641644 exclude_tags = []
642- for tag in args .omit_tags .split ("," ):
643- if not tag :
644- continue
645- if tag not in TAGS :
646- print "%(red)s[TAG]%(end)s" % cosmetics .colors , \
647- "Unkown tag '%s'" % tag
648- exit (- 1 )
649- exclude_tags .append (TAGS [tag ])
645+ include_tags = []
646+ for dest , src in ((exclude_tags , args .omit_tags ),
647+ (include_tags , args .only_tags )):
648+ for tag in src .split ("," ):
649+ if not tag :
650+ continue
651+ if tag not in TAGS :
652+ print "%(red)s[TAG]%(end)s" % cosmetics .colors , \
653+ "Unkown tag '%s'" % tag
654+ exit (- 1 )
655+ dest .append (TAGS [tag ])
656+
657+ if exclude_tags and include_tags :
658+ print "%(red)s[TAG]%(end)s" % cosmetics .colors , \
659+ "Omit and Only used together: whitelist mode"
650660
651661 # Handle coverage
652662 coveragerc = None
@@ -736,7 +746,7 @@ class ExampleJitterNoPython(ExampleJitter):
736746
737747
738748 # Filter testset according to tags
739- testset .filter_tags (exclude_tags = exclude_tags )
749+ testset .filter_tags (exclude_tags = exclude_tags , include_tags = include_tags )
740750
741751 # Run tests
742752 testset .run ()
0 commit comments