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
This commit is contained in:
Daniel Malea 2013-01-25 20:38:49 +00:00
parent f079de0a08
commit 318cbcef91
2 changed files with 6 additions and 0 deletions

View 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()

View 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)