Beispiel #1
0
 def __init__(self):
     RunnerOptions.__init__(self)
     self.add("schemafile",
              short="S:",
              long="schema=",
              default="schema.xml",
              handler=self.set_schemafile)
     self.add("interactive", None, "i", "interactive", flag=1)
     self.add("default_to_interactive",
              "runner.default_to_interactive",
              default=1)
     self.add("program",
              "runner.program",
              "p:",
              "program=",
              handler=string_list,
              required="no program specified; use -p or -C")
     self.add("logfile", "runner.logfile", "l:", "logfile=")
     self.add("python", "runner.python")
     self.add("zdrun", "runner.zdrun")
     programname = os.path.basename(sys.argv[0])
     base, ext = os.path.splitext(programname)
     if ext == ".py":
         programname = base
     self.add("prompt", "runner.prompt", default=(programname + ">"))
Beispiel #2
0
 def __init__(self):
     RunnerOptions.__init__(self)
     self.add("schemafile", short="S:", long="schema=",
              default="schema.xml",
              handler=self.set_schemafile)
     self.add("stoptimeut", "runner.stop_timeout")
     self.add("starttestprogram", "runner.start_test_program")
Beispiel #3
0
 def __init__(self):
     RunnerOptions.__init__(self)
     self.add("schemafile", short="S:", long="schema=",
              default="schema.xml",
              handler=self.set_schemafile)
     self.add("transcript", "runner.transcript", "t:", "transcript=",
              default="/dev/null")
Beispiel #4
0
    def realize(self, *args, **kwds):

        RunnerOptions.realize(self, *args, **kwds)

        # Maybe the config file requires -i or positional args
        if not self.args:
            self.usage("an action argument is required")

        # Where's python?
        if not self.python:
            self.python = sys.executable
    def realize(self, *args, **kwds):

        RunnerOptions.realize(self, *args, **kwds)

        # Maybe the config file requires -i or positional args
        if not self.args:
            self.usage("an action argument is required")

        # Where's python?
        if not self.python:
            self.python = sys.executable
Beispiel #6
0
    def realize(self, *args, **kwds):

        RunnerOptions.realize(self, *args, **kwds)

        # Maybe the config file requires -i or positional args
        if not self.args and not self.interactive:
            if not self.default_to_interactive:
                self.usage("either -i or an action argument is required")
            self.interactive = 1

        # Where's python?
        if not self.python:
            self.python = sys.executable
Beispiel #7
0
    def realize(self, *args, **kwds):
        
        RunnerOptions.realize(self, *args, **kwds)

        # Maybe the config file requires -i or positional args
        if not self.args and not self.interactive:
            if not self.default_to_interactive:
                self.usage("either -i or an action argument is required")
            self.interactive = 1

        # Where's python?
        if not self.python:
            self.python = sys.executable
Beispiel #8
0
 def realize(self, *args, **kwds):
     RunnerOptions.realize(self, *args, **kwds)
     if self.args:
         self.program = self.args
     if not self.program:
         self.usage("no program specified (use -C or positional args)")
     if self.sockname:
         # Convert socket name to absolute path
         self.sockname = os.path.abspath(self.sockname)
     if self.config_logger is None:
         # This doesn't perform any configuration of the logging
         # package, but that's reasonable in this case.
         self.logger = logging.getLogger()
     else:
         self.logger = self.config_logger()
 def realize(self, *args, **kwds):
     RunnerOptions.realize(self, *args, **kwds)
     if self.args:
         self.program = self.args
     if not self.program:
         self.usage("no program specified (use -C or positional args)")
     if self.sockname:
         # Convert socket name to absolute path
         self.sockname = os.path.abspath(self.sockname)
     if self.config_logger is None:
         # This doesn't perform any configuration of the logging
         # package, but that's reasonable in this case.
         self.logger = logging.getLogger()
     else:
         self.logger = self.config_logger()
Beispiel #10
0
 def __init__(self):
     RunnerOptions.__init__(self)
     self.add("schemafile", short="S:", long="schema=",
              default="schema.xml",
              handler=self.set_schemafile)
     self.add("program", "runner.program", "p:", "program=",
              handler=string_list,
              required="no program specified; use -p or -C")
     self.add("logfile", "runner.logfile", "l:", "logfile=")
     self.add("start_timeout", "runner.start_timeout",
              "T:", "start-timeout=", int, default=300)
     self.add("python", "runner.python")
     self.add("zdrun", "runner.zdrun")
     programname = os.path.basename(sys.argv[0])
     base, ext = os.path.splitext(programname)
     if ext == ".py":
         programname = base
     self.add("prompt", "runner.prompt", default=(programname + ">"))
Beispiel #11
0
    def realize(self, *args, **kwds):
        RunnerOptions.realize(self, *args, **kwds)

        # Maybe the config file requires -i or positional args
        if not self.args and not self.interactive:
            if not self.default_to_interactive:
                self.usage("either -i or an action argument is required")
            self.interactive = 1

        # Where's python?
        if not self.python:
            self.python = sys.executable

        # Where's zdrun?
        if not self.zdrun:
            if __name__ == "__main__":
                file = sys.argv[0]
            else:
                file = __file__
            file = os.path.normpath(os.path.abspath(file))
            dir = os.path.dirname(file)
            self.zdrun = os.path.join(dir, "zdrun.py")
Beispiel #12
0
 def load_logconf(self, sectname):
     """Load alternate eventlog if the specified section isn't present."""
     RunnerOptions.load_logconf(self, sectname)
     if self.config_logger is None and sectname != "eventlog":
         RunnerOptions.load_logconf(self, "eventlog")
 def load_logconf(self, sectname):
     """Load alternate eventlog if the specified section isn't present."""
     RunnerOptions.load_logconf(self, sectname)
     if self.config_logger is None and sectname != "eventlog":
         RunnerOptions.load_logconf(self, "eventlog")