aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite/lib
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@cygnus>1994-12-08 01:48:25 +0000
committerKen Raeburn <raeburn@cygnus>1994-12-08 01:48:25 +0000
commit09a1cedb20acfe688efc33c24a0a0f5e1a763ea1 (patch)
tree833ec47704bbec31fd2c41b8e2e14e383255d852 /gas/testsuite/lib
parentd2ccfce3d2bb5bfe2b53c513cef9775b75dad389 (diff)
downloadgdb-09a1cedb20acfe688efc33c24a0a0f5e1a763ea1.zip
gdb-09a1cedb20acfe688efc33c24a0a0f5e1a763ea1.tar.gz
gdb-09a1cedb20acfe688efc33c24a0a0f5e1a763ea1.tar.bz2
boost timeout to at least 2min; fix a couple mips tests for 64-bit host disasm
Diffstat (limited to 'gas/testsuite/lib')
-rw-r--r--gas/testsuite/lib/gas-defs.exp30
1 files changed, 22 insertions, 8 deletions
diff --git a/gas/testsuite/lib/gas-defs.exp b/gas/testsuite/lib/gas-defs.exp
index 773158e..6fb4d78 100644
--- a/gas/testsuite/lib/gas-defs.exp
+++ b/gas/testsuite/lib/gas-defs.exp
@@ -109,7 +109,7 @@ proc gas_test { file as_opts var_opts testname } {
if [expr $i&$num] then {
set extra_opts "$extra_opts $opt($bit)"
if $ignore_stdout($bit) then {
- set maybe_ignore_stdout "1>/dev/null"
+ set maybe_ignore_stdout ">/dev/null"
}
}
}
@@ -131,14 +131,14 @@ proc gas_test { file as_opts var_opts testname } {
proc gas_test_ignore_stdout { file as_opts testname } {
global comp_output
- gas_run $file $as_opts "2>&1 1>/dev/null"
+ gas_run $file $as_opts ">/dev/null"
want_no_output $testname
}
proc gas_test_error { file as_opts testname } {
global comp_output
- gas_run $file $as_opts "2>&1 1>/dev/null"
+ gas_run $file $as_opts ">/dev/null"
if ![string match "" $comp_output] then {
send_log "$comp_output\n"
verbose "$comp_output" 3
@@ -198,6 +198,7 @@ proc run_dump_test { name } {
set opts(nm) {}
set opts(name) {}
set opts(PROG) {}
+ set opts(source) {}
foreach i $opt_array {
set opt_name [lindex $i 0]
@@ -236,7 +237,13 @@ proc run_dump_test { name } {
eval set program \$[string toupper $program]
if { $opts(name) == "" } { set testname "$subdir/$name" } else { set testname $opts(name) }
- catch "exec $srcdir/lib/run $AS $ASFLAGS $opts(as) ${file}.s" comp_output
+ if { $opts(source) == "" } {
+ set sourcefile ${file}.s
+ } else {
+ set sourcefile $srcdir/$subdir/$opts(source)
+ }
+
+ catch "exec $srcdir/lib/run $AS $ASFLAGS $opts(as) $sourcefile" comp_output
if ![string match "" $comp_output] then {
send_log "$comp_output\n"
@@ -245,8 +252,9 @@ proc run_dump_test { name } {
return
}
- if [catch "exec $program -r > dump.out" comp_output] {
- fail_phase $testname {running objdump} {-r}
+ if { $progopts1 == "" } { set $progopts1 "-r" }
+ if [catch "exec $program $progopts $progopts1 > dump.out" comp_output] {
+ fail_phase $testname {running objdump} "$progopts $progopts1"
return
}
@@ -268,7 +276,7 @@ proc slurp_options { file } {
set nws {[^ ]*}
# whitespace is ignored anywhere except within the options list;
# option names are alphabetic only
- set pat "^#${ws}(\[a-zA-Z\]*)$ws:${ws}($nws)$ws\$"
+ set pat "^#${ws}(\[a-zA-Z\]*)$ws:${ws}(.*)$ws\$"
while { [gets $f line] != -1 } {
set line [string trim $line]
# Whitespace here is space-tab.
@@ -312,6 +320,10 @@ proc objdump_finish { } {
catch "wait"
}
+# Default timeout is 10 seconds, loses on a slow machine. But some
+# configurations of dejagnu may override it.
+if {$timeout<120} then { set timeout 120 }
+
expect_after {
timeout { perror "timeout" }
"virtual memory exhausted" { perror "virtual memory exhausted" }
@@ -366,12 +378,14 @@ proc regexp_diff { file_1 file_2 } {
if { $end } { break }
verbose "regexp \"^$line_b$\"\nline \"$line_a\"" 3
if ![regexp "^$line_b$" "$line_a"] {
- verbose "no match" 3
+ send_log "regexp_diff match failure\n"
+ send_log "regexp \"^$line_b$\"\nline \"$line_a\"\n"
set differences 1
}
}
if { $differences == 0 && [eof $file_a] != [eof $file_b] } {
+ send_log "different lengths\n"
verbose "different lengths" 3
set differences 1
}