github.com/osrg/gobgp/v3@v3.30.0/test/lib/noseplugin.py (about)

     1  import os
     2  from nose.plugins import Plugin
     3  
     4  parser_option = None
     5  
     6  
     7  class OptionParser(Plugin):
     8  
     9      def options(self, parser, env=os.environ):
    10          super(OptionParser, self).options(parser, env=env)
    11          parser.add_option('--test-prefix', action="store", dest="test_prefix", default="")
    12          parser.add_option('--gobgp-image', action="store", dest="gobgp_image", default="osrg/gobgp")
    13          parser.add_option('--exabgp-path', action="store", dest="exabgp_path", default="")
    14          parser.add_option('--go-path', action="store", dest="go_path", default="")
    15          parser.add_option('--gobgp-log-level', action="store",
    16                            dest="gobgp_log_level", default="info")
    17          parser.add_option('--test-index', action="store", type="int", dest="test_index", default=0)
    18          parser.add_option('--config-format', action="store", dest="config_format", default="yaml")
    19  
    20      def configure(self, options, conf):
    21          super(OptionParser, self).configure(options, conf)
    22          global parser_option
    23          parser_option = options
    24  
    25          if not self.enabled:
    26              return
    27  
    28      def finalize(self, result):
    29          pass