So my only comment is that I'd prefer it automagically detect whether
the user is specifying a test number, or a test name.  I've got
something similar to my personal scripts which essentially does the
following:

        if args.test[0].isdigit():
            test_flags = args.test
        else:
            test_flags = "-k %s" % args.test

What do you thin Joe?

Ethan

On Thu, May 29, 2014 at 10:13 AM, Ben Pfaff <b...@nicira.com> wrote:
> Ethan, I think you should review this.
>
> On Sun, May 18, 2014 at 9:11 PM, Joe Stringer <joestrin...@nicira.com> wrote:
>> Signed-off-by: Joe Stringer <joestrin...@nicira.com>
>> ---
>>  utilities/ovs-dev.py |   10 ++++++++++
>>  1 file changed, 10 insertions(+)
>>
>> diff --git a/utilities/ovs-dev.py b/utilities/ovs-dev.py
>> index 7a4425f..97fab6c 100755
>> --- a/utilities/ovs-dev.py
>> +++ b/utilities/ovs-dev.py
>> @@ -144,6 +144,10 @@ commands.append(make)
>>
>>
>>  def check():
>> +    flags = ""
>> +    if options.tests:
>> +        flags += options.tests
>> +    ENV["TESTSUITEFLAGS"] = flags
>>      make("check")
>>  commands.append(check)
>>
>> @@ -339,6 +343,12 @@ def main():
>>                           const=i, help="compile with -O%d" % i)
>>      parser.add_option_group(group)
>>
>> +    group = optparse.OptionGroup(parser, "check")
>> +    group.add_option("--tests", dest="tests", metavar="FILTER",
>> +                     help="""run specific tests or a test category
>> +                          eg, --tests=\"1-10\", --tests=\"-k megaflow\"""")
>> +    parser.add_option_group(group)
>> +
>>      group = optparse.OptionGroup(parser, "run")
>>      group.add_option("-g", "--gdb", dest="gdb", action="store_true",
>>                       help="run ovs-vswitchd under gdb")
>> --
>> 1.7.10.4
>>
>> _______________________________________________
>> dev mailing list
>> dev@openvswitch.org
>> http://openvswitch.org/mailman/listinfo/dev
>
>
>
> --
> "I don't normally do acked-by's.  I think it's my way of avoiding
> getting blamed when it all blows up."               Andrew Morton
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to