supporting multiple buildtest options at once

This commit is contained in:
Tully Foote 2009-10-01 18:53:48 +00:00
parent 01690d9c13
commit 17f548365b
1 changed files with 8 additions and 6 deletions

View File

@ -489,9 +489,9 @@ class RosMakeAll:
parser.add_option("-V", dest="full_verbose", default=False, parser.add_option("-V", dest="full_verbose", default=False,
action="store_true", help="display all builds") action="store_true", help="display all builds")
parser.add_option("--buildtest", dest="buildtest", parser.add_option("--buildtest", dest="buildtest",
action="store", help="package to buildtest") action="append", help="package to buildtest")
parser.add_option("--buildtest1", dest="buildtest1", parser.add_option("--buildtest1", dest="buildtest1",
action="store", help="package to buildtest1") action="append", help="package to buildtest1")
parser.add_option("--output", dest="output_dir", parser.add_option("--output", dest="output_dir",
action="store", help="where to output results") action="store", help="where to output results")
parser.add_option("--pre-clean", dest="pre_clean", parser.add_option("--pre-clean", dest="pre_clean",
@ -540,12 +540,14 @@ class RosMakeAll:
self.print_all( "Building all packages") self.print_all( "Building all packages")
else: # no need to extend if all already selected else: # no need to extend if all already selected
if options.buildtest: if options.buildtest:
packages.extend(roslib.scriptutil.rospack_depends_on(options.buildtest)) for p in options.buildtest:
self.print_all( "Buildtest requested for package %s adding it and all dependent packages: "%options.buildtest) packages.extend(roslib.scriptutil.rospack_depends_on(p))
self.print_all( "Buildtest requested for package %s adding it and all dependent packages: "%p)
if options.buildtest1: if options.buildtest1:
packages.extend(roslib.scriptutil.rospack_depends_on_1(options.buildtest1)) for p in options.buildtest1:
self.print_all( "Buildtest requested for package %s adding it and all depends-on1 packages: "%options.buildtest1) packages.extend(roslib.scriptutil.rospack_depends_on_1(p))
self.print_all( "Buildtest requested for package %s adding it and all depends-on1 packages: "%p)
if len(packages) == 0 and len(args) == 0: if len(packages) == 0 and len(args) == 0:
packages = [os.path.basename(os.path.abspath('.'))] packages = [os.path.basename(os.path.abspath('.'))]