git @ Cat's Eye Technologies Falderal / 098f647
Verbose. (not sure when I made these changes, checking them in now.) Chris Pressey 2 years ago
1 changed file(s) with 9 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
524524 def __init__(self):
525525 pass
526526
527 def run(self, body=None, input=None):
527 def run(self, body=None, input=None, verbose=False):
528528 """Returns the RunResult of running this implementation on the
529529 given test body and input.
530530
547547 def __str__(self):
548548 return u'callable "%r"' % self.callable
549549
550 def run(self, body=None, input=None):
550 def run(self, body=None, input=None, verbose=False):
551551 try:
552552 result = self.callable(body, input)
553553 return OutputOutcome(result)
573573 `value`, but make sure `value` is properly shell-escaped first."""
574574 return command.replace(var_name, shlex_quote(value))
575575
576 def run(self, body=None, input=None):
576 def run(self, body=None, input=None, verbose=False):
577577 # first, expand all known variables in the command, using subst().
578578 test_filename = None
579579 output_filename = None
623623 os.close(fd)
624624 # replace all occurrences in command
625625 command = self.subst(command, '%(output-file)', output_filename)
626
627 if verbose:
628 print(self, command)
626629
627630 # subshell the command and return the output
628631 pipe = Popen(command, shell=True,
717720 """
718721 results = []
719722 for implementation in self.functionality.implementations:
720 result = implementation.run(body=self.body, input=self.input)
723 result = implementation.run(
724 body=self.body, input=self.input, verbose=options.verbose
725 )
721726 if self.judge(result, options):
722727 results.append(Success(self, implementation))
723728 else: