From 318cbcef91a64c433424db0941bbed74b3447e31 Mon Sep 17 00:00:00 2001 From: Daniel Malea Date: Fri, 25 Jan 2013 20:38:49 +0000 Subject: [PATCH] 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) llvm-svn: 173485 --- lldb/test/expression_command/test/TestExprs.py | 5 +++++ lldb/test/lldbtest.py | 1 + 2 files changed, 6 insertions(+) diff --git a/lldb/test/expression_command/test/TestExprs.py b/lldb/test/expression_command/test/TestExprs.py index ffbd4d654c6d..422e05e3e2e6 100644 --- a/lldb/test/expression_command/test/TestExprs.py +++ b/lldb/test/expression_command/test/TestExprs.py @@ -28,6 +28,11 @@ class BasicExprCommandsTestCase(TestBase): 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/lldb/test/lldbtest.py b/lldb/test/lldbtest.py index 17ad7181c504..fbfb26911d8c 100644 --- a/lldb/test/lldbtest.py +++ b/lldb/test/lldbtest.py @@ -733,6 +733,7 @@ class Base(unittest2.TestCase): 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)