Disable confirmation prompts for testing
- set auto-confirm to false when running TestExprs (avoid hang when using API)
- set prompt-on-quit to false in test helper (avoid timeout when using lldb CLI)
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@173485 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/expression_command/test/TestExprs.py b/test/expression_command/test/TestExprs.py
index ffbd4d6..422e05e 100644
--- a/test/expression_command/test/TestExprs.py
+++ b/test/expression_command/test/TestExprs.py
@@ -28,6 +28,11 @@
self.line = line_number('main.cpp',
'// Please test many expressions while stopped at this line:')
+ # Disable confirmation prompt to avoid infinite wait
+ self.runCmd("settings set auto-confirm true")
+ self.addTearDownHook(lambda: self.runCmd("settings clear auto-confirm"))
+
+
def test_many_expr_commands(self):
"""These basic expression commands should work as expected."""
self.buildDefault()
diff --git a/test/lldbtest.py b/test/lldbtest.py
index 17ad718..fbfb269 100644
--- a/test/lldbtest.py
+++ b/test/lldbtest.py
@@ -733,6 +733,7 @@
if self.child_in_script_interpreter:
self.child.sendline('quit()')
self.child.expect_exact(self.child_prompt)
+ self.child.sendline('settings set interpreter.prompt-on-quit false')
self.child.sendline('quit')
try:
self.child.expect(pexpect.EOF)