mirror of
https://github.com/openvswitch/ovs
synced 2025-10-21 14:49:41 +00:00
ovs-dev.py: Add option to run tests in parallel.
Signed-off-by: Joe Stringer <joestringer@nicira.com> Acked-by: Ethan Jackson <ethan@nicira.com>
This commit is contained in:
@@ -145,6 +145,10 @@ commands.append(make)
|
|||||||
|
|
||||||
def check():
|
def check():
|
||||||
flags = ""
|
flags = ""
|
||||||
|
if options.jobs:
|
||||||
|
flags += "-j%d " % options.jobs
|
||||||
|
else:
|
||||||
|
flags += "-j8 "
|
||||||
if options.tests:
|
if options.tests:
|
||||||
for arg in str.split(options.tests):
|
for arg in str.split(options.tests):
|
||||||
if arg[0].isdigit():
|
if arg[0].isdigit():
|
||||||
@@ -364,6 +368,8 @@ def main():
|
|||||||
parser.add_option_group(group)
|
parser.add_option_group(group)
|
||||||
|
|
||||||
group = optparse.OptionGroup(parser, "check")
|
group = optparse.OptionGroup(parser, "check")
|
||||||
|
group.add_option("-j", "--jobs", dest="jobs", metavar="N", type="int",
|
||||||
|
help="Run N tests in parallel")
|
||||||
group.add_option("--tests", dest="tests", metavar="FILTER",
|
group.add_option("--tests", dest="tests", metavar="FILTER",
|
||||||
help="""run specific tests and/or a test category
|
help="""run specific tests and/or a test category
|
||||||
eg, --tests=\"1-10 megaflow\"""")
|
eg, --tests=\"1-10 megaflow\"""")
|
||||||
|
Reference in New Issue
Block a user