This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit] python.exp cleanups
- From: Doug Evans <dje at google dot com>
- To: gdb-patches at sourceware dot org
- Date: Tue, 01 Oct 2013 13:39:17 -0700
- Subject: [commit] python.exp cleanups
- Authentication-results: sourceware.org; auth=none
Hi.
I noticed a few issues in python.exp.
Regression tested and committed.
[There are other problems with unique test names in this file.
I didn't address them all.]
2013-10-01 Doug Evans <dje@google.com>
* gdb.python/python.exp: Remove redundant print-stack tests.
Make all print-stack test names unique. Fix spelling of print-stack.
Index: python.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.python/python.exp,v
retrieving revision 1.40
diff -u -p -r1.40 python.exp
--- python.exp 1 Jan 2013 06:41:26 -0000 1.40
+++ python.exp 1 Oct 2013 20:33:10 -0000
@@ -208,15 +208,9 @@ gdb_test "python gdb.write(\"Error strea
gdb_test "python gdb.write(\"Normal stream\\n\", stream=gdb.STDOUT)" "Normal stream" "Test stdout write"
gdb_test "python gdb.write(\"Log stream\\n\", stream=gdb.STDLOG)" "Log stream" "Test stdlog write"
-# print-stack
-gdb_test "show python print-stack" \
- "The mode of Python stack printing on error is \"message\".*" \
- "Test print-backtrace show setting. Default is message."
+# Turn on full stack printing for subsequent tests.
gdb_py_test_silent_cmd "set python print-stack full" \
- "Test print-backtrace set setting" 1
-gdb_test "show python print-stack" \
- "The mode of Python stack printing on error is \"full\".*" \
- "Test print-backtrace show setting to full."
+ "Set print-stack full for prompt tests" 1
# Test prompt substituion
@@ -339,20 +333,20 @@ if ![runto_main] then {
# print-stack settings
gdb_test "show python print-stack" \
"The mode of Python stack printing on error is \"message\".*" \
- "Test print-backtrace show setting. Default is message."
+ "Test print-stack show setting. Default is message."
gdb_py_test_silent_cmd "set python print-stack full" \
- "Test print-backtrace set setting" 1
+ "Test print-stack set setting to full" 1
gdb_test "show python print-stack" \
"The mode of Python stack printing on error is \"full\".*" \
- "Test print-backtrace show setting to full."
+ "Test print-stack show setting to full"
gdb_py_test_silent_cmd "set python print-stack none" \
- "Test print-backtrace set setting" 1
+ "Test print-stack set setting to none" 1
gdb_test "show python print-stack" \
"The mode of Python stack printing on error is \"none\".*" \
- "Test print-backtrace show setting to none."
+ "Test print-stack show setting to none"
gdb_py_test_silent_cmd "set python print-stack message" \
- "Test print-backtrace set setting" 1
+ "Test print-stack set setting to message" 1
gdb_py_test_multiple "prompt substitution readline" \
"python" "" \
@@ -371,7 +365,7 @@ gdb_py_test_silent_cmd "python gdb.promp
"set the hook to default" 1
gdb_py_test_silent_cmd "set python print-stack full" \
- "Test print-backtrace set setting" 1
+ "set print-stack full for prompt error test" 1
gdb_test_multiple "python gdb.prompt_hook = error_prompt" "set the hook" {
-re "Traceback.*File.*line.*RuntimeError.*Python exception called.*" {