[ovs-dev] [PATCH 1/2] ovs-dev.py: Add option to specify which tests to run.

Joe Stringer joestringer at nicira.com
Thu May 29 21:03:52 UTC 2014


This seems reasonable. I'll send a follow-up patch.


On 30 May 2014 08:08, Ethan Jackson <ethan at nicira.com> wrote:

> 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 <blp at nicira.com> wrote:
> > Ethan, I think you should review this.
> >
> > On Sun, May 18, 2014 at 9:11 PM, Joe Stringer <joestringer at nicira.com>
> wrote:
> >> Signed-off-by: Joe Stringer <joestringer at 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 at 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-dev/attachments/20140530/25fecb7e/attachment-0005.html>


More information about the dev mailing list