[Lldb-commits] [lldb] r116718 - /lldb/trunk/test/settings/TestSettings.py
Johnny Chen
johnny.chen at apple.com
Mon Oct 18 10:51:45 PDT 2010
Author: johnny
Date: Mon Oct 18 12:51:45 2010
New Revision: 116718
URL: http://llvm.org/viewvc/llvm-project?rev=116718&view=rev
Log:
Add a case to test that after 'set auto-confirm true', manual confirmation should not kick in.
Also add a more useful assert message for test_set_output_path(), which is currently decorated
with @expectedFailure.
Modified:
lldb/trunk/test/settings/TestSettings.py
Modified: lldb/trunk/test/settings/TestSettings.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/settings/TestSettings.py?rev=116718&r1=116717&r2=116718&view=diff
==============================================================================
--- lldb/trunk/test/settings/TestSettings.py (original)
+++ lldb/trunk/test/settings/TestSettings.py Mon Oct 18 12:51:45 2010
@@ -47,6 +47,31 @@
self.expect("settings show",
substrs = ["term-width (int) = '70'"])
+ def test_set_auto_confirm(self):
+ """Test that after 'set auto-confirm true', manual confirmation should not kick in."""
+ self.buildDefault()
+
+ exe = os.path.join(os.getcwd(), "a.out")
+ self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
+
+ # No '-o' option is needed for static setting.
+ self.runCmd("settings set auto-confirm true")
+
+ # Immediately test the setting.
+ self.expect("settings show auto-confirm",
+ startstr = "auto-confirm (boolean) = 'true'")
+
+ # Now 'breakpoint delete' should just work fine without confirmation
+ # prompt from the command interpreter.
+ self.runCmd("breakpoint set -n main")
+ self.expect("breakpoint delete",
+ startstr = "All breakpoints removed")
+
+ # Restore the original setting of auto-confirm.
+ self.runCmd("settings set -r auto-confirm")
+ self.expect("settings show auto-confirm",
+ startstr = "auto-confirm (boolean) = 'false'")
+
@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
def test_with_dsym(self):
"""Test that run-args and env-vars are passed to the launched process."""
@@ -96,6 +121,10 @@
self.runCmd("run", RUN_SUCCEEDED)
+ # The 'stdout.txt' file should now exist.
+ self.assertTrue(os.path.isfile("stdout.txt"),
+ "'stdout.txt' exists due to target.process.output-path.")
+
# Read the output file produced by running the program.
with open('stdout.txt', 'r') as f:
output = f.read()
More information about the lldb-commits
mailing list