From: Rob Savoye Date: Mon, 30 Aug 1993 22:26:03 +0000 (+0000) Subject: Add values for RUNTEST and RUNTESTFLAGS so cross testing works better. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7e7cb02f81eec8ce079261b7e5230ef17db24660;p=binutils-gdb.git Add values for RUNTEST and RUNTESTFLAGS so cross testing works better. --- diff --git a/gdb/testsuite/config/mt-a29k-udi b/gdb/testsuite/config/mt-a29k-udi index ac0743ee9b3..b3b4e4d9318 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 55799cfca34..60db0a772dd 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 3056806d509..19b1cabe5e7 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 5effbe8b3f0..bf5e4860d77 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 d7805159eb4..d7971924b12 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 2a58480c235..90a1369f97c 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 18772965b78..2cb1b080810 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 62d1d934e72..ed6067d57c4 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 c7ad691d1f9..e4fe6709d60 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 eef7acb9eca..6b0602ff8d3 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 70ebdac9e5b..018cc54c1fd 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 8819844cb52..c3abe6504e2 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 1fb3c4f9ef5..11e743f2553 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 a42628e2c07..a494666210f 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 ff17f53b48c..dbadd3826de 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 0a7155a0b80..a54d5611ace 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 { # "" { 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" -# } -