diff options
author | Andrew Cagney <cagney@redhat.com> | 2004-07-13 17:08:36 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2004-07-13 17:08:36 +0000 |
commit | 6bf46641b813342f98d64efa3c367e530cb86bb9 (patch) | |
tree | 461999bab1213ead8c780b51eb28027d0274b8f6 /gdb | |
parent | ceb78239b960115d51d00518a384236fe5abdb02 (diff) | |
download | gdb-6bf46641b813342f98d64efa3c367e530cb86bb9.zip gdb-6bf46641b813342f98d64efa3c367e530cb86bb9.tar.gz gdb-6bf46641b813342f98d64efa3c367e530cb86bb9.tar.bz2 |
2004-07-13 Andrew Cagney <cagney@gnu.org>
* gdb.base/sizeof.exp: Skip test when no inferior I/O.
(check_sizeof, check_valueof): Do not include the output in the
test name. Use gdb_test.
(get_valueof): Use gdb_test_multiple.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/sizeof.exp | 45 |
2 files changed, 17 insertions, 33 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index cb90911..a838b11 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2004-07-13 Andrew Cagney <cagney@gnu.org> + * gdb.base/sizeof.exp: Skip test when no inferior I/O. + (check_sizeof, check_valueof): Do not include the output in the + test name. Use gdb_test. + (get_valueof): Use gdb_test_multiple. + * gdb.base/step-test.exp: Update copyright. Use gdb_test_multiple. Ensure that test names do not include architecture dependent output. diff --git a/gdb/testsuite/gdb.base/sizeof.exp b/gdb/testsuite/gdb.base/sizeof.exp index c12c699..b10ffbc 100644 --- a/gdb/testsuite/gdb.base/sizeof.exp +++ b/gdb/testsuite/gdb.base/sizeof.exp @@ -16,6 +16,11 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +if [target_info exists gdb,noinferiorio] { + verbose "Skipping fileio.exp because of no fileio capabilities." + continue +} + if $tracelevel { strace $tracelevel } @@ -57,15 +62,13 @@ if ![runto_main] then { proc get_valueof { fmt exp default } { global gdb_prompt - send_gdb "print${fmt} ${exp}\n" - gdb_expect { + + set test "get valueof \"${exp}\"" + set val ${default} + gdb_test_multiple "print${fmt} ${exp}" "$test" { -re "\\$\[0-9\]* = (\[-\]*\[0-9\]*).*$gdb_prompt $" { set val $expect_out(1,string) - pass "get value of ${exp} ($val)" - } - timeout { - set size ${default} - fail "get value of ${exp} (timeout)" + pass "$test ($val)" } } return ${val} @@ -97,17 +100,8 @@ set sizeof_long_double [get_sizeof "long double" 8] proc check_sizeof { type size } { global gdb_prompt - if [gdb_skip_stdio_test "check sizeof $type == $size"] { - return; - } - set pat [string_to_regexp "sizeof (${type}) == ${size}"] - set test "check sizeof ${type}" - gdb_test_multiple "next" "$test" { - -re "${pat}\[\r\n\].*$gdb_prompt $" { - pass "$test" - } - } + gdb_test "next" "${pat}\[\r\n\]+\[0-9\].*" "check sizeof \"$type\"" } check_sizeof "char" ${sizeof_char} @@ -126,23 +120,8 @@ check_sizeof "long double" ${sizeof_long_double} proc check_valueof { exp val } { global gdb_prompt - if [gdb_skip_stdio_test "check valueof $exp == $val"] { - return; - } - set pat [string_to_regexp "valueof (${exp}) == ${val}"] - send_gdb "next\n" - gdb_expect { - -re "${pat}\[\r\n\].*$gdb_prompt $" { - pass "check valueof ${exp} == ${val}" - } - -re ".*$gdb_prompt $" { - fail "check valueof ${exp} == ${val}" - } - timeout { - fail "check valueof ${exp} == ${val} (timeout)" - } - } + gdb_test "next" "${pat}\[\r\n\]+\[0-9\].*" "check valueof \"$exp\"" } # Check that GDB and the target agree over the sign of a character. |