* [patch] Remove duplicate gdb_py_test_multiple functions.
@ 2011-01-07 15:32 Phil Muldoon
2011-01-07 16:45 ` Tom Tromey
0 siblings, 1 reply; 3+ messages in thread
From: Phil Muldoon @ 2011-01-07 15:32 UTC (permalink / raw)
To: gdb-patches
This patch removes some duplicate definitions of gdb_py_test_multiple
from the Python test-suite. Instead, use the definition declared in
gdb-python.exp. There are no regressions with this patch.
OK?
Cheers
Phil
-
2011-01-07 Phil Muldoon <pmuldoon@redhat.com>
* gdb.python/py-cmd.exp: Remove gdb_py_test_multiple function.
Use load_lib gdb-python.exp.
* gdb.python/python.exp: Ditto.
* gdb.python/py-function.exp: Ditto.
--
diff --git a/gdb/testsuite/gdb.python/py-cmd.exp b/gdb/testsuite/gdb.python/py-cmd.exp
index 66d3e53..e4706cd 100644
--- a/gdb/testsuite/gdb.python/py-cmd.exp
+++ b/gdb/testsuite/gdb.python/py-cmd.exp
@@ -20,23 +20,7 @@ if $tracelevel then {
strace $tracelevel
}
-# Usage: gdb_py_test_multiple NAME INPUT RESULT {INPUT RESULT}...
-# Run a test named NAME, consisting of multiple lines of input.
-# After each input line INPUT, search for result line RESULT.
-# Succeed if all results are seen; fail otherwise.
-proc gdb_py_test_multiple {name args} {
- global gdb_prompt
- foreach {input result} $args {
- if {[gdb_test_multiple $input "$name - $input" {
- -re "\[\r\n\]*($result)\[\r\n\]+($gdb_prompt | *>)$" {
- pass "$name - $input"
- }
- }]} {
- return 1
- }
- }
- return 0
-}
+load_lib gdb-python.exp
# Start with a fresh gdb.
diff --git a/gdb/testsuite/gdb.python/py-function.exp b/gdb/testsuite/gdb.python/py-function.exp
index a5c8025..bbbbf42 100644
--- a/gdb/testsuite/gdb.python/py-function.exp
+++ b/gdb/testsuite/gdb.python/py-function.exp
@@ -20,23 +20,7 @@ if $tracelevel then {
strace $tracelevel
}
-# Usage: gdb_py_test_multiple NAME INPUT RESULT {INPUT RESULT}...
-# Run a test named NAME, consisting of multiple lines of input.
-# After each input line INPUT, search for result line RESULT.
-# Succeed if all results are seen; fail otherwise.
-proc gdb_py_test_multiple {name args} {
- global gdb_prompt
- foreach {input result} $args {
- if {[gdb_test_multiple $input "$name - $input" {
- -re "\[\r\n\]*($result)\[\r\n\]+($gdb_prompt | *>)$" {
- pass "$name - $input"
- }
- }]} {
- return 1
- }
- }
- return 0
-}
+load_lib gdb-python.exp
# Start with a fresh gdb.
diff --git a/gdb/testsuite/gdb.python/python.exp b/gdb/testsuite/gdb.python/python.exp
index 090f528..ece77ca 100644
--- a/gdb/testsuite/gdb.python/python.exp
+++ b/gdb/testsuite/gdb.python/python.exp
@@ -53,24 +53,6 @@ gdb_test_multiple "python print 23" "verify python support" {
-re "$gdb_prompt $" {}
}
-# Usage: gdb_py_test_multiple NAME INPUT RESULT {INPUT RESULT}...
-# Run a test named NAME, consisting of multiple lines of input.
-# After each input line INPUT, search for result line RESULT.
-# Succeed if all results are seen; fail otherwise.
-proc gdb_py_test_multiple {name args} {
- global gdb_prompt
- foreach {input result} $args {
- if {[gdb_test_multiple $input "$name - $input" {
- -re "\[\r\n\]*($result)\[\r\n\]+($gdb_prompt | *>)$" {
- pass "$name - $input"
- }
- }]} {
- return 1
- }
- }
- return 0
-}
-
gdb_py_test_multiple "multi-line python command" \
"python" "" \
"print 23" "" \
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch] Remove duplicate gdb_py_test_multiple functions.
2011-01-07 15:32 [patch] Remove duplicate gdb_py_test_multiple functions Phil Muldoon
@ 2011-01-07 16:45 ` Tom Tromey
2011-01-10 11:01 ` Phil Muldoon
0 siblings, 1 reply; 3+ messages in thread
From: Tom Tromey @ 2011-01-07 16:45 UTC (permalink / raw)
To: pmuldoon; +Cc: gdb-patches
>>>>> "Phil" == Phil Muldoon <pmuldoon@redhat.com> writes:
Phil> This patch removes some duplicate definitions of gdb_py_test_multiple
Phil> from the Python test-suite. Instead, use the definition declared in
Phil> gdb-python.exp. There are no regressions with this patch.
Phil> OK?
Yes, thanks.
Tom
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch] Remove duplicate gdb_py_test_multiple functions.
2011-01-07 16:45 ` Tom Tromey
@ 2011-01-10 11:01 ` Phil Muldoon
0 siblings, 0 replies; 3+ messages in thread
From: Phil Muldoon @ 2011-01-10 11:01 UTC (permalink / raw)
To: Tom Tromey; +Cc: gdb-patches
Tom Tromey <tromey@redhat.com> writes:
>>>>>> "Phil" == Phil Muldoon <pmuldoon@redhat.com> writes:
>
> Phil> This patch removes some duplicate definitions of gdb_py_test_multiple
> Phil> from the Python test-suite. Instead, use the definition declared in
> Phil> gdb-python.exp. There are no regressions with this patch.
>
> Phil> OK?
>
> Yes, thanks.
So committed, thanks.
Cheers,
Phil
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-01-10 11:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-07 15:32 [patch] Remove duplicate gdb_py_test_multiple functions Phil Muldoon
2011-01-07 16:45 ` Tom Tromey
2011-01-10 11:01 ` Phil Muldoon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox