Clear auto-confirm setting on teardown for tests that use it

llvm-svn: 168382
This commit is contained in:
Daniel Malea 2012-11-20 19:46:54 +00:00
parent ba50ce4825
commit 1b8b392889
5 changed files with 5 additions and 0 deletions

View File

@ -40,6 +40,7 @@ class BreakpointCommandTestCase(TestBase):
self.line = line_number('main.c', '// Set break point at this line.')
# disable "There is a running process, kill it and restart?" prompt
self.runCmd("settings set auto-confirm true")
self.addTearDownHook(lambda: self.runCmd("settings clear auto-confirm"))
def breakpoint_command_sequence(self):
"""Test a sequence of breakpoint command add, list, and delete."""

View File

@ -17,6 +17,7 @@ class FloatTypesTestCase(AbstractBase.GenericTester):
AbstractBase.GenericTester.setUp(self)
# disable "There is a running process, kill it and restart?" prompt
self.runCmd("settings set auto-confirm true")
self.addTearDownHook(lambda: self.runCmd("settings clear auto-confirm"))
@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@dsym_test

View File

@ -20,6 +20,7 @@ class FloatTypesExprTestCase(AbstractBase.GenericTester):
AbstractBase.GenericTester.setUp(self)
# disable "There is a running process, kill it and restart?" prompt
self.runCmd("settings set auto-confirm true")
self.addTearDownHook(lambda: self.runCmd("settings clear auto-confirm"))
@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@dsym_test

View File

@ -17,6 +17,7 @@ class IntegerTypesTestCase(AbstractBase.GenericTester):
AbstractBase.GenericTester.setUp(self)
# disable "There is a running process, kill it and restart?" prompt
self.runCmd("settings set auto-confirm true")
self.addTearDownHook(lambda: self.runCmd("settings clear auto-confirm"))
@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@dsym_test

View File

@ -17,6 +17,7 @@ class IntegerTypesExprTestCase(AbstractBase.GenericTester):
AbstractBase.GenericTester.setUp(self)
# disable "There is a running process, kill it and restart?" prompt
self.runCmd("settings set auto-confirm true")
self.addTearDownHook(lambda: self.runCmd("settings clear auto-confirm"))
@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@dsym_test