Disable confirmation prompts for testing
authorDaniel Malea <daniel.malea@intel.com>
Fri, 25 Jan 2013 20:38:49 +0000 (20:38 +0000)
committerDaniel Malea <daniel.malea@intel.com>
Fri, 25 Jan 2013 20:38:49 +0000 (20:38 +0000)
- 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
lldb/test/lldbtest.py

index ffbd4d654c6d4bb3b9facfb1710af404a0b09b4a..422e05e3e2e6843a58c83811197558aa2075155d 100644 (file)
@@ -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()
index 17ad7181c5045e9f1e8e4f7c42ce6b978d75aa63..fbfb26911d8ce8317c53e01054a1972e88f85204 100644 (file)
@@ -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)