def test_additional_drivers(self): em = extension.ExtensionManager(BUILDER_DRIVER_NAMESPACE) em.extensions.append(extension.Extension('test', None, None, None)) drivers = set(Builder.builder_names(em)) base_drivers = copy.copy(BASE_DRIVERS) base_drivers.add('test') self.assertEqual(drivers, base_drivers)
def main(): """ the entry point for all things giftwrap """ parser = argparse.ArgumentParser() parser.add_argument('-d', '--debug', action='store_true', help='Set logging level to DEBUG') subparsers = parser.add_subparsers(title='subcommands', description='valid subcommands', help='additional help') build_subcmd = subparsers.add_parser('build', description='build giftwrap packages') build_subcmd.add_argument('-m', '--manifest', required=True) build_subcmd.add_argument('-v', '--version') build_subcmd.add_argument('-t', '--type', choices=Builder.builder_names(), required=True) build_subcmd.add_argument('-s', '--synchronous', dest='parallel', action='store_false') def csvarg(arg): if arg is not None: return arg.split(',') build_subcmd.add_argument('-p', '--projects', type=csvarg, dest='projects') build_subcmd.set_defaults(func=build) args = parser.parse_args() log_level = logging.INFO if args.debug: log_level = logging.DEBUG _setup_logger(log_level) args.func(args)
def main(): """ the entry point for all things giftwrap """ parser = argparse.ArgumentParser() parser.add_argument("-d", "--debug", action="store_true", help="Set logging level to DEBUG") subparsers = parser.add_subparsers(title="subcommands", description="valid subcommands", help="additional help") build_subcmd = subparsers.add_parser("build", description="build giftwrap packages") build_subcmd.add_argument("-m", "--manifest", required=True) build_subcmd.add_argument("-v", "--version") build_subcmd.add_argument("-t", "--type", choices=Builder.builder_names(), required=True) build_subcmd.add_argument("-s", "--synchronous", dest="parallel", action="store_false") build_subcmd.set_defaults(func=build) args = parser.parse_args() log_level = logging.INFO if args.debug: log_level = logging.DEBUG _setup_logger(log_level) args.func(args)
def test_default_drivers(self): drivers = set(Builder.builder_names()) self.assertEqual(drivers, BASE_DRIVERS)