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

Joe Stringer joestringer at nicira.com
Mon May 19 04:11:55 UTC 2014


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




More information about the dev mailing list