diff options
author | Rob Savoye <rob@cygnus> | 1993-08-30 22:26:03 +0000 |
---|---|---|
committer | Rob Savoye <rob@cygnus> | 1993-08-30 22:26:03 +0000 |
commit | 7e7cb02f81eec8ce079261b7e5230ef17db24660 (patch) | |
tree | 17aef047cb9bc2a500959a827020083040371bb7 | |
parent | b556573de3aaedc438b81b80a87f67d23211dd09 (diff) | |
download | gdb-7e7cb02f81eec8ce079261b7e5230ef17db24660.zip gdb-7e7cb02f81eec8ce079261b7e5230ef17db24660.tar.gz gdb-7e7cb02f81eec8ce079261b7e5230ef17db24660.tar.bz2 |
Add values for RUNTEST and RUNTESTFLAGS so cross testing works better.
-rw-r--r-- | gdb/testsuite/config/mt-a29k-udi | 2 | ||||
-rw-r--r-- | gdb/testsuite/config/mt-frwcom-aout | 2 | ||||
-rw-r--r-- | gdb/testsuite/config/mt-i386-aout | 2 | ||||
-rw-r--r-- | gdb/testsuite/config/mt-i960-nindy | 2 | ||||
-rw-r--r-- | gdb/testsuite/config/mt-i960-vx | 2 | ||||
-rw-r--r-- | gdb/testsuite/config/mt-m68k-abug-aout | 4 | ||||
-rw-r--r-- | gdb/testsuite/config/mt-m68k-abug-coff | 10 | ||||
-rw-r--r-- | gdb/testsuite/config/mt-m68k-aout | 2 | ||||
-rw-r--r-- | gdb/testsuite/config/mt-m68k-coff | 4 | ||||
-rw-r--r-- | gdb/testsuite/config/mt-m68k-vx | 7 | ||||
-rw-r--r-- | gdb/testsuite/config/mt-mips | 2 | ||||
-rw-r--r-- | gdb/testsuite/config/mt-sparc-aout | 2 | ||||
-rw-r--r-- | gdb/testsuite/config/mt-sparc-vx | 2 | ||||
-rw-r--r-- | gdb/testsuite/config/mt-sparclite | 2 | ||||
-rw-r--r-- | gdb/testsuite/config/unix-gdb.exp | 21 | ||||
-rw-r--r-- | gdb/testsuite/config/vx-gdb.exp | 77 |
16 files changed, 97 insertions, 46 deletions
diff --git a/gdb/testsuite/config/mt-a29k-udi b/gdb/testsuite/config/mt-a29k-udi index ac0743e..b3b4e4d 100644 --- a/gdb/testsuite/config/mt-a29k-udi +++ b/gdb/testsuite/config/mt-a29k-udi @@ -55,3 +55,5 @@ GDBFLAGS = -nx DIFF = diff DIFFFLAGS = +RUNTEST=a29k-amd-udi-runtest +RUNTESTFLAGS= diff --git a/gdb/testsuite/config/mt-frwcom-aout b/gdb/testsuite/config/mt-frwcom-aout index 55799cf..60db0a7 100644 --- a/gdb/testsuite/config/mt-frwcom-aout +++ b/gdb/testsuite/config/mt-frwcom-aout @@ -55,3 +55,5 @@ GDBFLAGS = -nx DIFF = diff DIFFFLAGS = +RUNTEST=sparclitefrwcompat-aout-runtest +RUNTESTFLAGS= diff --git a/gdb/testsuite/config/mt-i386-aout b/gdb/testsuite/config/mt-i386-aout index 3056806..19b1cab 100644 --- a/gdb/testsuite/config/mt-i386-aout +++ b/gdb/testsuite/config/mt-i386-aout @@ -55,3 +55,5 @@ GDBFLAGS = -nx DIFF = diff DIFFFLAGS = +RUNTEST=i386-aout-runtest +RUNTESTFLAGS= diff --git a/gdb/testsuite/config/mt-i960-nindy b/gdb/testsuite/config/mt-i960-nindy index 5effbe8..bf5e486 100644 --- a/gdb/testsuite/config/mt-i960-nindy +++ b/gdb/testsuite/config/mt-i960-nindy @@ -55,3 +55,5 @@ GDBFLAGS = -nx DIFF = diff DIFFFLAGS = +RUNTEST=i960-intel-nindy-runtest +RUNTESTFLAGS= diff --git a/gdb/testsuite/config/mt-i960-vx b/gdb/testsuite/config/mt-i960-vx index d780515..d797192 100644 --- a/gdb/testsuite/config/mt-i960-vx +++ b/gdb/testsuite/config/mt-i960-vx @@ -55,3 +55,5 @@ GDBFLAGS = -nx DIFF = diff DIFFFLAGS = +RUNTEST=i960-vxworks-runtest +RUNTESTFLAGS= diff --git a/gdb/testsuite/config/mt-m68k-abug-aout b/gdb/testsuite/config/mt-m68k-abug-aout index 2a58480..90a1369 100644 --- a/gdb/testsuite/config/mt-m68k-abug-aout +++ b/gdb/testsuite/config/mt-m68k-abug-aout @@ -33,7 +33,7 @@ OBJDUMPFLAGS = DEMANGLE = m68k-aout-demangle DEMANGLEFLAGS = -COPY = m68k-aout-copy +COPY = m68k-aout-objcopy COPYFLAGS = # other utils @@ -55,3 +55,5 @@ GDBFLAGS = -nx DIFF = diff DIFFFLAGS = +RUNTEST=m68k-aout-runtest +RUNTESTFLAGS= diff --git a/gdb/testsuite/config/mt-m68k-abug-coff b/gdb/testsuite/config/mt-m68k-abug-coff index 1877296..2cb1b08 100644 --- a/gdb/testsuite/config/mt-m68k-abug-coff +++ b/gdb/testsuite/config/mt-m68k-abug-coff @@ -1,6 +1,6 @@ # compilers and assemblers CC = m68k-coff-gcc -CFLAGS = -g -D${target_os} -u read +CFLAGS = -g -D${target_os} C++ = ${CC} C++FLAGS = ${CFLAGS} CXX = ${CC} @@ -10,8 +10,8 @@ ASFLAGS = FC = FCFLAGS = LD = ld -LDFLAGS = -T${srcdir}/config/m68k.gld -LIBS = -lstub +LDFLAGS = -T/usr/cygnus/progressive-921225/H-sparc-sun-sunos4.1.1/lib/gcc-lib/m68k-coff/cygnus-2.2.4/mvme135.ld +LIBS = -lgcc -lc -lg -lmvme135 # binutils @@ -33,7 +33,7 @@ OBJDUMPFLAGS = DEMANGLE = m68k-coff-demangle DEMANGLEFLAGS = -COPY = m68k-coff-copy +COPY = m68k-coff-objcopy COPYFLAGS = # other utils @@ -55,3 +55,5 @@ GDBFLAGS = -nx DIFF = diff DIFFFLAGS = +RUNTEST=m68k-coff-runtest +RUNTESTFLAGS= diff --git a/gdb/testsuite/config/mt-m68k-aout b/gdb/testsuite/config/mt-m68k-aout index 62d1d93..ed6067d 100644 --- a/gdb/testsuite/config/mt-m68k-aout +++ b/gdb/testsuite/config/mt-m68k-aout @@ -55,3 +55,5 @@ GDBFLAGS = -nx DIFF = diff DIFFFLAGS = +RUNTEST=m68k-aout-runtest +RUNTESTFLAGS= diff --git a/gdb/testsuite/config/mt-m68k-coff b/gdb/testsuite/config/mt-m68k-coff index c7ad691..e4fe670 100644 --- a/gdb/testsuite/config/mt-m68k-coff +++ b/gdb/testsuite/config/mt-m68k-coff @@ -9,7 +9,7 @@ AS = m68k-coff-as ASFLAGS = FC = FCFLAGS = -LD = m68k-coff-ld +LD = ld LDFLAGS = LIBS = @@ -55,3 +55,5 @@ GDBFLAGS = -nx DIFF = diff DIFFFLAGS = +RUNTEST=m68k-coff-runtest +RUNTESTFLAGS= diff --git a/gdb/testsuite/config/mt-m68k-vx b/gdb/testsuite/config/mt-m68k-vx index eef7acb..6b0602f 100644 --- a/gdb/testsuite/config/mt-m68k-vx +++ b/gdb/testsuite/config/mt-m68k-vx @@ -1,9 +1,6 @@ -RUNTEST = m68k-vxworks-runtest -RUNTESTFLAGS = - # compilers and assemblers CC = m68k-vxworks-gcc -CFLAGS = -g -r -D${target_os} -I/cygint/limbo/unsupported/packages/vxworks/vx68/5.0.3/h +CFLAGS = -g -r -D${target_os} -I/unsupported/packages/vxworks/vx68/5.0.3/h -I/s1/packages/vx68/h C++ = ${CC} C++FLAGS = ${CFLAGS} CXX = ${CC} @@ -58,3 +55,5 @@ GDBFLAGS = -nx DIFF = diff DIFFFLAGS = +RUNTEST=m68k-vxworks-runtest +RUNTESTFLAGS= diff --git a/gdb/testsuite/config/mt-mips b/gdb/testsuite/config/mt-mips index 70ebdac..018cc54 100644 --- a/gdb/testsuite/config/mt-mips +++ b/gdb/testsuite/config/mt-mips @@ -55,3 +55,5 @@ GDBFLAGS = -nx DIFF = diff DIFFFLAGS = +RUNTESTFLAGS=mips-idt-ecoff-runtest +RUNTESTFLAGS= diff --git a/gdb/testsuite/config/mt-sparc-aout b/gdb/testsuite/config/mt-sparc-aout index 8819844..c3abe65 100644 --- a/gdb/testsuite/config/mt-sparc-aout +++ b/gdb/testsuite/config/mt-sparc-aout @@ -55,3 +55,5 @@ GDBFLAGS = -nx DIFF = diff DIFFFLAGS = +RUNTESTFLAGS=sparc-aout-runtest +RUNTESTFLAGS= diff --git a/gdb/testsuite/config/mt-sparc-vx b/gdb/testsuite/config/mt-sparc-vx index 1fb3c4f..11e743f 100644 --- a/gdb/testsuite/config/mt-sparc-vx +++ b/gdb/testsuite/config/mt-sparc-vx @@ -55,3 +55,5 @@ GDBFLAGS = -nx DIFF = diff DIFFFLAGS = +RUNTESTFLAGS=sparc-vxworks-runtest +RUNTESTFLAGS= diff --git a/gdb/testsuite/config/mt-sparclite b/gdb/testsuite/config/mt-sparclite index a42628e..a494666 100644 --- a/gdb/testsuite/config/mt-sparclite +++ b/gdb/testsuite/config/mt-sparclite @@ -55,3 +55,5 @@ GDBFLAGS = -nx DIFF = diff DIFFFLAGS = +RUNTESTFLAGS=sparclite-runtest +RUNTESTFLAGS= diff --git a/gdb/testsuite/config/unix-gdb.exp b/gdb/testsuite/config/unix-gdb.exp index ff17f53..dbadd38 100644 --- a/gdb/testsuite/config/unix-gdb.exp +++ b/gdb/testsuite/config/unix-gdb.exp @@ -19,6 +19,8 @@ # This file was written by Rob Savoye. (rob@cygnus.com) +load_lib gdb.exp + # variables that need to set up # if ![info exists prompt] then { @@ -163,19 +165,19 @@ proc gdb_start {} { if $verbose>1 then { send_user "Spawning $GDB $GDBFLAGS\n" } - + set oldtimeout $timeout set timeout [expr "$timeout + 60"] if [ llength $GDBFLAGS ] then { if {[which $GDB] != 0} then { - spawn $GDB $GDBFLAGS - } else { + spawn $GDB $GDBFLAGS + } else { error "$GDB does not exist." exit 1 } } else { if {[which $GDB] != 0} then { - spawn $GDB + spawn $GDB } else { error "$GDB does not exist." exit 1 @@ -185,8 +187,8 @@ proc gdb_start {} { -re ".*$prompt $" { if $verbose>1 then { send_user "GDB initialized for native mode\n" + } } - } -re "$prompt $" { error "GDB never initialized." return -1 @@ -215,14 +217,18 @@ proc gdb_start {} { -re ".*$prompt $" { if $verbose>2 then { send_user "Seting width to 0.\n" -} + } } timeout { warning "Couldn't set the width to 0." -} + } } } +proc gdb_exit { } { + default_gdb_exit +} + # These only need to be uncommented for debugging test cases. They exist # mainly to catch programming errors #expect_after { @@ -235,7 +241,6 @@ proc gdb_start {} { # "Undefined command" { error "send string probably wrong." } #} -load_lib gdb.exp set binpath /s1/users/rob/vxworks/bin/somewhere-bogus-that-needs-configuring set bin $GDB diff --git a/gdb/testsuite/config/vx-gdb.exp b/gdb/testsuite/config/vx-gdb.exp index 0a7155a..a54d561 100644 --- a/gdb/testsuite/config/vx-gdb.exp +++ b/gdb/testsuite/config/vx-gdb.exp @@ -23,6 +23,9 @@ # load support libraries # load_lib remote.exp +load_lib gdb.exp +load_lib vxworks.exp + set shell_prompt "->" # these need to be initialized only if site.exp doesn't set them @@ -134,26 +137,32 @@ proc gdb_start { } { # reboot vxworks to get a clean start if $reboot then { - send_user "Rebooting VxWorks, Please wait...\n" + verbose "Rebooting VxWorks, Please wait...\n" send -i $shell_id "\CX" set timeout 120 expect { -i $shell_id -re "Connection closed.*$" { - verbose "\nVxWorks has closed the shell" 1 + verbose "\nVxWorks has closed the shell" } - eof { error "(eof) never disconnected from VxWorks shell."; return -1 } - timeout { error "(timeout) never disconnected from VxWorks shell."; return -1 } + -i $shell_id eof { + error "(eof) never disconnected from VxWorks shell." + return -1 + } + -i $shell_id timeout { + error "(timeout) never disconnected from VxWorks shell." + return -1 + } } - close -i $shell_id - - exec sleep 30 + catch "close -i $shell_id" tmp + wait -i $shell_id +# exec sleep 30 - set timeout 60 - set shell_id [ eval $connectmode "$targetname" ] - if $shell_id<0 then { - error "Couldn't connect to $targetname." - } +# set timeout 60 +# set shell_id [ eval $connectmode "$targetname" ] +# if $shell_id<0 then { +# error "Couldn't connect to $targetname." +# } } set timeout 10 @@ -170,17 +179,32 @@ proc spawn_vxgdb { } { # start GDB if [ llength $GDBFLAGS ] then { - spawn $GDB $GDBFLAGS + if {[which $GDB] != 0} then { + spawn $GDB $GDBFLAGS + } else { + error "$GDB does not exist." + exit 1 + } } else { - spawn $GDB + if {[which $GDB] != 0} then { + spawn $GDB + } else { + error "$GDB does not exist." + exit 1 + } } expect { - -re ".*$prompt $" { - verbose "$GDB initialized for cross mode to Vxworks\n" 1 + -re ".*$prompt $" { + verbose "$GDB initialized for cross mode to Vxworks\n" + } + -re "$prompt $" { + error "GDB never initialized." + return -1 + } + timeout { + error "(timeout) GDB never initialized." + return -1 } - -re "$prompt $" { error "GDB never initialized."; return -1 } - timeout { error "(timeout) GDB never initialized."; - return -1 } } # force the height to "unlimited", so no pagers get used @@ -217,6 +241,12 @@ proc spawn_vxgdb { } { set timeout 10 } +proc gdb_exit { } { + global shell_id + exit_remote_shell $shell_id + default_gdb_exit +} + #expect_after { # "<return>" { send "\n"; error "Window too small." } # -re "\(y or n\) " { send "n\n"; error "Got interactive prompt." } @@ -227,14 +257,5 @@ proc spawn_vxgdb { } { # "Undefined command" { error "send string probably wrong." } #} -load_lib gdb.exp - gdb_start -# make sure gdb has actually started, otherwise if the first test -# timesout, DejaGnu crashes -#send "\n" -#expect { -# -re "$prompt" -# } - |