예제 #1
0
 def RunCommand(self, command, env):
     full_command = self.context.processor(command)
     output = test.Execute(full_command, self.context,
                           self.context.GetTimeout(self.mode), env, True)
     self.Cleanup()
     return test.TestOutput(self, full_command, output,
                            self.context.store_unexpected_output)
예제 #2
0
 def RunCommand(self, command, env):
     input = None
     if self.input is not None and exists(self.input):
         input = open(self.input).read()
     full_command = self.context.processor(command)
     output = test.Execute(full_command,
                           self.context,
                           self.context.GetTimeout(self.mode),
                           env,
                           faketty=True,
                           input=input)
     return test.TestOutput(self, full_command, output,
                            self.context.store_unexpected_output)
예제 #3
0
 def RunCommand(self, command, env):
     fd = None
     if self.input is not None and exists(self.input):
         fd = os.open(self.input, os.O_RDONLY)
     full_command = self.context.processor(command)
     full_command = [sys.executable, PTY_HELPER] + full_command
     output = test.Execute(full_command,
                           self.context,
                           self.context.GetTimeout(self.mode),
                           env,
                           stdin=fd)
     if fd is not None:
         os.close(fd)
     return test.TestOutput(self, full_command, output,
                            self.context.store_unexpected_output)