================ @@ -32,6 +37,39 @@ def check_help_options(self, cmd_name, opt_list, substrs=[]): print(f"Opt Vec\n{substrs}") self.expect("help " + cmd_name, substrs=substrs) + def run_one_repeat(self, commands, expected_num_errors): + with open(self.stdin_path, "w") as input_handle: + input_handle.write(commands) + + in_fileH = open(self.stdin_path, "r") + self.dbg.SetInputFileHandle(in_fileH, False) + + out_fileH = open(self.stdout_path, "w") + self.dbg.SetOutputFileHandle(out_fileH, False) + self.dbg.SetErrorFileHandle(out_fileH, False) + + options = lldb.SBCommandInterpreterRunOptions() + options.SetEchoCommands(False) + options.SetPrintResults(True) + options.SetPrintErrors(True) + options.SetAllowRepeats(True) + + n_errors, quit_requested, has_crashed = self.dbg.RunCommandInterpreter( + True, False, options, 0, False, False + ) + + in_fileH.close() + out_fileH.close() + + results = None + with open(self.stdout_path, "r") as out_fileH: + results = out_fileH.read() + + print(f"RESULTS:\n{results}\nDONE") ---------------- medismailben wrote:
May be we should only print if the test suite in verbose/trace mode. https://github.com/llvm/llvm-project/pull/94823 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits