This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
PATCH: Add proc run_list_test to gas-defs.exp
- From: Nick Clifton <nickc at redhat dot com>
- To: binutils at sourceware dot org
- Date: Tue, 05 Jun 2007 18:00:26 +0100
- Subject: PATCH: Add proc run_list_test to gas-defs.exp
Hi Guys,
Whilst working on a PR I noticed that we have a lot of almost
identical duplicates of the run_list_test proc in the gas
testsuite. So I decided to get rid of them all and just have one
definition in gas-defs.exp. (As it turned out the gas/elf.exp file
has its own customised version so I left that one alone, although I
did change its name).
Tested by rebuilding 98 different toolchains and then running
regression tests for them all!
Cheers
Nick
gas/testsuite/ChangeLog
2007-06-05 Nick Clifton <nickc@redhat.com>
* lib/gas-defs.exp (run_list_test): New proc.
* gas/alpha/alpha.exp: Delete proc run_list_test.
* gas/bfin/bfin.exp : Likewise.
* gas/cfi/cfi.exp : Likewise.
* gas/crx/allinsn.exp : Likewise.
* gas/d10v/d10v.exp : Likewise.
* gas/d30v/d30v.exp : Likewise.
* gas/frv/allinsn.exp : Likewise.
* gas/i386/i386.exp : Likewise.
* gas/i860.i860.exp : Likewise.
* gas/ia64/ia64.exp : Likewise.
* gas/lns/lns.exp : Likewise.
* gas/macros/macros.exp : Likewise.
* gas/maxq10/maxq10.exp : Likewise.
* gas/maxq20/maxq20.exp : Likewise.
* gas/mips/mips.exp : Likewise.
* gas/mmix/mmix-list.exp : Likewise.
* gas/mn10300/basic.exp : Likewise.
* gas/msp430/msp430.exp : Likewise.
* gas/pdp11/pdp11.exp : Likewise.
* gas/ppc/ppc.exp : Likewise.
* gas/s390/s390.exp : Likewise.
* gas/elf/elf.exp (proc run_list_test): Rename to run_elf_list_test.
Index: gas/testsuite/gas/alpha/alpha.exp
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/alpha/alpha.exp,v
retrieving revision 1.8
diff -c -3 -p -r1.8 alpha.exp
*** gas/testsuite/gas/alpha/alpha.exp 3 Sep 2003 09:32:21 -0000 1.8
--- gas/testsuite/gas/alpha/alpha.exp 5 Jun 2007 13:55:03 -0000
***************
*** 2,20 ****
# Some generic alpha tests
#
- proc run_list_test { name opts } {
- global srcdir subdir
- set testname "alpha $name"
- set file $srcdir/$subdir/$name
- gas_run ${name}.s $opts ">&dump.out"
- if { [regexp_diff "dump.out" "${file}.l"] } then {
- fail $testname
- verbose "output is [file_contents "dump.out"]" 2
- return
- }
- pass $testname
- }
-
if { [istarget alpha*-*-*] } then {
set elf [expr [istarget *-*-elf*] \
--- 2,7 ----
Index: gas/testsuite/gas/bfin/bfin.exp
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/bfin/bfin.exp,v
retrieving revision 1.1
diff -c -3 -p -r1.1 bfin.exp
*** gas/testsuite/gas/bfin/bfin.exp 30 Sep 2005 15:10:16 -0000 1.1
--- gas/testsuite/gas/bfin/bfin.exp 5 Jun 2007 13:55:03 -0000
***************
*** 1,17 ****
# Blackfin assembler testsuite
- proc run_list_test { name opts } {
- global srcdir subdir
- set testname "bfin $name"
- set file $srcdir/$subdir/$name
- gas_run ${name}.s $opts ">&dump.out"
- if { [regexp_diff "dump.out" "${file}.l"] } then {
- fail $testname
- verbose "output is [file_contents "dump.out"]" 2
- return
- }
- pass $testname
- }
if [istarget bfin*-*-*] {
run_dump_test "arithmetic"
run_dump_test "bit"
--- 1,5 ----
Index: gas/testsuite/gas/cfi/cfi.exp
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/cfi/cfi.exp,v
retrieving revision 1.18
diff -c -3 -p -r1.18 cfi.exp
*** gas/testsuite/gas/cfi/cfi.exp 10 Nov 2006 14:15:52 -0000 1.18
--- gas/testsuite/gas/cfi/cfi.exp 5 Jun 2007 13:55:04 -0000
***************
*** 1,17 ****
- # ??? This probably shouldn't be replicated here...
- proc run_list_test { name opts } {
- global srcdir subdir
- set testname "cfi $name"
- set file $srcdir/$subdir/$name
- gas_run ${name}.s $opts ">&dump.out"
- if { [regexp_diff "dump.out" "${file}.l"] } then {
- fail $testname
- verbose "output is [file_contents "dump.out"]" 2
- return
- }
- pass $testname
- }
-
if ![is_elf_format] then {
return
}
--- 1,3 ----
Index: gas/testsuite/gas/crx/allinsn.exp
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/crx/allinsn.exp,v
retrieving revision 1.1
diff -c -3 -p -r1.1 allinsn.exp
*** gas/testsuite/gas/crx/allinsn.exp 3 Sep 2004 14:31:41 -0000 1.1
--- gas/testsuite/gas/crx/allinsn.exp 5 Jun 2007 13:55:04 -0000
***************
*** 2,20 ****
# Driver for CRX assembler testsuite
#
- proc run_list_test { name opts } {
- global srcdir subdir
- set testname "CRX $name"
- set file $srcdir/$subdir/$name
- gas_run ${name}.s $opts ">&dump.out"
- if {[regexp_diff "dump.out" "${file}.l"] } {
- fail $testname
- verbose "output is [file_contents "dump.out"]" 2
- return
- }
- pass $testname
- }
-
if ![istarget crx-*-*] {
return
}
--- 2,7 ----
Index: gas/testsuite/gas/d10v/d10v.exp
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/d10v/d10v.exp,v
retrieving revision 1.2
diff -c -3 -p -r1.2 d10v.exp
*** gas/testsuite/gas/d10v/d10v.exp 30 May 2002 16:12:19 -0000 1.2
--- gas/testsuite/gas/d10v/d10v.exp 5 Jun 2007 13:55:04 -0000
***************
*** 1,19 ****
#
# Driver for D10V assembler testsuite
#
- proc run_list_test { name opts } {
- global srcdir subdir
- set testname "D10V $name"
- set file $srcdir/$subdir/$name
- gas_run ${name}.s $opts ">&dump.out"
- if {[regexp_diff "dump.out" "${file}.l"] } {
- fail $testname
- verbose "output is [file_contents "dump.out"]" 2
- return
- }
- pass $testname
- }
-
if {[istarget d10v-*-*]} {
run_dump_test "inst"
run_dump_test "address-001"
--- 1,6 ----
Index: gas/testsuite/gas/d30v/d30.exp
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/d30v/d30.exp,v
retrieving revision 1.1.1.1
diff -c -3 -p -r1.1.1.1 d30.exp
*** gas/testsuite/gas/d30v/d30.exp 3 May 1999 07:28:48 -0000 1.1.1.1
--- gas/testsuite/gas/d30v/d30.exp 5 Jun 2007 13:55:04 -0000
***************
*** 2,20 ****
# D30V assembler tests
#
- proc run_list_test { name opts } {
- global srcdir subdir
- set testname "D30V $name"
- set file $srcdir/$subdir/$name
- gas_run ${name}.s $opts ">&dump.out"
- if {[regexp_diff "dump.out" "${file}.l"] } {
- fail $testname
- verbose "output is [file_contents "dump.out"]" 2
- return
- }
- pass $testname
- }
-
if {[istarget d30v-*-*]} {
run_dump_test "inst"
run_dump_test "align"
--- 2,7 ----
Index: gas/testsuite/gas/elf/elf.exp
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/elf/elf.exp,v
retrieving revision 1.36
diff -c -3 -p -r1.36 elf.exp
*** gas/testsuite/gas/elf/elf.exp 6 Feb 2007 15:13:26 -0000 1.36
--- gas/testsuite/gas/elf/elf.exp 5 Jun 2007 13:55:04 -0000
***************
*** 2,8 ****
# elf tests
#
! proc run_list_test { name suffix opts readelf_opts readelf_pipe } {
global READELF
global srcdir subdir
set testname "elf $name list"
--- 2,8 ----
# elf tests
#
! proc run_elf_list_test { name suffix opts readelf_opts readelf_pipe } {
global READELF
global srcdir subdir
set testname "elf $name list"
*************** if { ([istarget "*-*-*elf*"]
*** 89,99 ****
}
run_dump_test "section0"
run_dump_test "section1"
! run_list_test "section2" "$target_machine" "-al" "-s" ""
run_dump_test "section3"
run_dump_test "section4"
! run_list_test "section5" "" "-al" "-SW" "| grep \" \\\\.test\\\[0-9\\\]\""
run_dump_test "struct"
run_dump_test "symver"
! run_list_test "type" "" "" "-s" "| grep \"1 \\\[FONT\\\]\""
}
--- 89,99 ----
}
run_dump_test "section0"
run_dump_test "section1"
! run_elf_list_test "section2" "$target_machine" "-al" "-s" ""
run_dump_test "section3"
run_dump_test "section4"
! run_elf_list_test "section5" "" "-al" "-SW" "| grep \" \\\\.test\\\[0-9\\\]\""
run_dump_test "struct"
run_dump_test "symver"
! run_elf_list_test "type" "" "" "-s" "| grep \"1 \\\[FONT\\\]\""
}
Index: gas/testsuite/gas/frv/allinsn.exp
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/frv/allinsn.exp,v
retrieving revision 1.5
diff -c -3 -p -r1.5 allinsn.exp
*** gas/testsuite/gas/frv/allinsn.exp 27 Aug 2004 09:32:02 -0000 1.5
--- gas/testsuite/gas/frv/allinsn.exp 5 Jun 2007 13:55:04 -0000
***************
*** 1,31 ****
# FRV assembler testsuite.
- proc run_list_test { name opts } {
- global srcdir subdir
- set testname "$name error test ($opts)"
- gas_run $name.s $opts >&dump.out
- if {[regexp_diff dump.out $srcdir/$subdir/$name.l]} {
- fail $testname
- verbose "output is [file_contents dump.out]" 2
- return
- }
- pass $testname
- }
-
if [istarget frv*-*-*] {
run_dump_test "allinsn"
run_dump_test "fdpic"
run_dump_test "reloc1"
run_dump_test "fr405-insn"
! run_list_test "fr405-insn" "-mcpu=fr400"
! run_list_test "fr405-insn" "-mcpu=fr500"
run_dump_test "fr450-spr"
run_dump_test "fr450-insn"
! run_list_test "fr450-insn" "-mcpu=fr405"
! run_list_test "fr450-insn" "-mcpu=fr400"
! run_list_test "fr450-insn" "-mcpu=fr500"
run_list_test "fr450-media-issue" "-mcpu=fr450"
run_dump_test "fr550-pack1"
--- 1,19 ----
# FRV assembler testsuite.
if [istarget frv*-*-*] {
run_dump_test "allinsn"
run_dump_test "fdpic"
run_dump_test "reloc1"
run_dump_test "fr405-insn"
! run_list_test "fr405-insn" "-mcpu=fr400" "fr405-insn -mcpu=fr400"
! run_list_test "fr405-insn" "-mcpu=fr500" "fr405-insn -mcpu=fr500"
run_dump_test "fr450-spr"
run_dump_test "fr450-insn"
! run_list_test "fr450-insn" "-mcpu=fr405" "fr450-insn -mcpu=fr405"
! run_list_test "fr450-insn" "-mcpu=fr400" "fr450-insn -mcpu=fr400"
! run_list_test "fr450-insn" "-mcpu=fr500" "fr450-insn -mcpu=fr500"
run_list_test "fr450-media-issue" "-mcpu=fr450"
run_dump_test "fr550-pack1"
Index: gas/testsuite/gas/i386/i386.exp
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/i386/i386.exp,v
retrieving revision 1.68
diff -c -3 -p -r1.68 i386.exp
*** gas/testsuite/gas/i386/i386.exp 3 May 2007 21:07:16 -0000 1.68
--- gas/testsuite/gas/i386/i386.exp 5 Jun 2007 13:55:04 -0000
***************
*** 1,19 ****
#
# i386 tests
#
- proc run_list_test { name opts } {
- global srcdir subdir
- set testname "i386 $name"
- set file $srcdir/$subdir/$name
- gas_run ${name}.s $opts ">&dump.out"
- if { [regexp_diff "dump.out" "${file}.l"] } then {
- fail $testname
- verbose "output is [file_contents "dump.out"]" 2
- return
- }
- pass $testname
- }
-
proc gas_64_check { } {
global NM
global NMFLAGS
--- 1,6 ----
Index: gas/testsuite/gas/i860/i860.exp
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/i860/i860.exp,v
retrieving revision 1.6
diff -c -3 -p -r1.6 i860.exp
*** gas/testsuite/gas/i860/i860.exp 17 Aug 2003 03:16:23 -0000 1.6
--- gas/testsuite/gas/i860/i860.exp 5 Jun 2007 13:55:04 -0000
***************
*** 1,18 ****
# i860 assembler testsuite.
- proc run_list_test { name opts } {
- global srcdir subdir
- set testname "i860 $name"
- set file $srcdir/$subdir/$name
- gas_run ${name}.s $opts ">&dump.out"
- if { [regexp_diff "dump.out" "${file}.l"] } then {
- fail $testname
- verbose "output is [file_contents "dump.out"]" 2
- return
- }
- pass $testname
- }
-
if [istarget i860-*-*] {
run_dump_test "bitwise"
run_dump_test "branch"
--- 1,5 ----
Index: gas/testsuite/gas/ia64/ia64.exp
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/ia64/ia64.exp,v
retrieving revision 1.41
diff -c -3 -p -r1.41 ia64.exp
*** gas/testsuite/gas/ia64/ia64.exp 9 Jan 2006 17:14:40 -0000 1.41
--- gas/testsuite/gas/ia64/ia64.exp 5 Jun 2007 13:55:04 -0000
***************
*** 1,19 ****
#
# ia64 tests
#
- proc run_list_test { name opts } {
- global srcdir subdir
- set testname "ia64 $name"
- set file $srcdir/$subdir/$name
- gas_run ${name}.s $opts ">&dump.out"
- if { [regexp_diff "dump.out" "${file}.l"] } then {
- fail $testname
- verbose "output is [file_contents "dump.out"]" 2
- return
- }
- pass $testname
- }
-
if [istarget "ia64-*"] then {
run_dump_test "regs"
--- 1,6 ----
Index: gas/testsuite/gas/lns/lns.exp
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/lns/lns.exp,v
retrieving revision 1.5
diff -c -3 -p -r1.5 lns.exp
*** gas/testsuite/gas/lns/lns.exp 28 Feb 2007 18:38:51 -0000 1.5
--- gas/testsuite/gas/lns/lns.exp 5 Jun 2007 13:55:04 -0000
***************
*** 1,17 ****
- # ??? This probably shouldn't be replicated here...
- proc run_list_test { name opts } {
- global srcdir subdir
- set testname "lns $name"
- set file $srcdir/$subdir/$name
- gas_run ${name}.s $opts ">&dump.out"
- if { [regexp_diff "dump.out" "${file}.l"] } then {
- fail $testname
- verbose "output is [file_contents "dump.out"]" 2
- return
- }
- pass $testname
- }
-
if ![is_elf_format] then {
return
}
--- 1,3 ----
Index: gas/testsuite/gas/macros/macros.exp
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/macros/macros.exp,v
retrieving revision 1.26
diff -c -3 -p -r1.26 macros.exp
*** gas/testsuite/gas/macros/macros.exp 28 Feb 2006 07:55:36 -0000 1.26
--- gas/testsuite/gas/macros/macros.exp 5 Jun 2007 13:55:04 -0000
***************
*** 1,18 ****
# Run some tests of gas macros.
- proc run_list_test { name opts } {
- global srcdir subdir
- set testname "macros $name"
- set file $srcdir/$subdir/$name
- gas_run ${name}.s $opts ">&dump.out"
- if { [regexp_diff "dump.out" "${file}.l"] } then {
- fail $testname
- verbose "output is [file_contents "dump.out"]" 2
- return
- }
- pass $testname
- }
-
if { ![istarget hppa*-*-*] || [istarget *-*-linux*] } {
run_dump_test test1
}
--- 1,5 ----
*************** run_dump_test app3
*** 69,74 ****
--- 56,62 ----
run_dump_test app4
run_list_test badarg ""
+
case $target_triplet in {
{ *c54x*-*-* } { }
{ *c4x*-*-* } { }
Index: gas/testsuite/gas/maxq10/maxq10.exp
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/maxq10/maxq10.exp,v
retrieving revision 1.2
diff -c -3 -p -r1.2 maxq10.exp
*** gas/testsuite/gas/maxq10/maxq10.exp 8 Mar 2005 22:41:05 -0000 1.2
--- gas/testsuite/gas/maxq10/maxq10.exp 5 Jun 2007 13:55:04 -0000
***************
*** 1,19 ****
#
# MAXQ10 tests
#
- proc run_list_test { name opts } {
- global srcdir subdir
- set testname "maxq10 $name"
- set file $srcdir/$subdir/$name
- gas_run ${name}.s $opts ">&dump.out"
- if { [regexp_diff "dump.out" "${file}.l"] } then {
- fail $testname
- verbose "output is [file_contents "dump.out"]" 2
- return
- }
- pass $testname
- }
-
proc gas_64_check { } {
global NM
global NMFLAGS
--- 1,6 ----
Index: gas/testsuite/gas/maxq20/maxq20.exp
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/maxq20/maxq20.exp,v
retrieving revision 1.2
diff -c -3 -p -r1.2 maxq20.exp
*** gas/testsuite/gas/maxq20/maxq20.exp 8 Mar 2005 22:41:05 -0000 1.2
--- gas/testsuite/gas/maxq20/maxq20.exp 5 Jun 2007 13:55:04 -0000
***************
*** 1,19 ****
#
# MAXQ20 tests
#
- proc run_list_test { name opts } {
- global srcdir subdir
- set testname "maxq20 $name"
- set file $srcdir/$subdir/$name
- gas_run ${name}.s $opts ">&dump.out"
- if { [regexp_diff "dump.out" "${file}.l"] } then {
- fail $testname
- verbose "output is [file_contents "dump.out"]" 2
- return
- }
- pass $testname
- }
-
proc gas_64_check { } {
global NM
global NMFLAGS
--- 1,6 ----
Index: gas/testsuite/gas/mips/mips.exp
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/mips/mips.exp,v
retrieving revision 1.127
diff -c -3 -p -r1.127 mips.exp
*** gas/testsuite/gas/mips/mips.exp 20 Feb 2007 13:28:53 -0000 1.127
--- gas/testsuite/gas/mips/mips.exp 5 Jun 2007 13:55:04 -0000
*************** proc run_dump_test_arches { name arch_li
*** 292,318 ****
}
}
- # run_list_test NAME OPTS (optional): TESTNAME
- #
- # Assemble the file "NAME.d" and compare the assembler standard error
- # output against the regular expressions given in the file "NAME.l".
- # The assembler is passed the flags given in OPTS. If TESTNAME is
- # provided, it will be used as the name of the test.
- proc run_list_test { name opts {testname {}} } {
- global srcdir subdir
- if { [string length $testname] == 0 } then {
- set testname "MIPS $name"
- }
- set file $srcdir/$subdir/$name
- gas_run ${name}.s $opts ">&dump.out"
- if { [regexp_diff "dump.out" "${file}.l"] } then {
- fail $testname
- verbose "output is [file_contents "dump.out"]" 2
- return
- }
- pass $testname
- }
-
# run_list_test_arch NAME OPTS ARCH
#
# Invoke "run_list_test" for test NAME with options OPTS, with extra
--- 292,297 ----
Index: gas/testsuite/gas/mmix/mmix-list.exp
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/mmix/mmix-list.exp,v
retrieving revision 1.2
diff -c -3 -p -r1.2 mmix-list.exp
*** gas/testsuite/gas/mmix/mmix-list.exp 5 May 2005 09:13:15 -0000 1.2
--- gas/testsuite/gas/mmix/mmix-list.exp 5 Jun 2007 13:55:04 -0000
*************** if { ! [istarget "mmix-*"] } {
*** 18,41 ****
return
}
- proc run_list_test { name opts } {
- global srcdir subdir runtests
-
- if ![runtest_file_p $runtests $name] then {
- return
- }
-
- set testname "mmix list $name"
- set file $srcdir/$subdir/$name
- gas_run ${name}.s $opts ">&dump.out"
- if { [regexp_diff "dump.out" "${file}.l"] } then {
- fail $testname
- verbose "output is [file_contents "dump.out"]" 2
- return
- }
- pass $testname
- }
-
proc run_mmix_list_tests { } {
global srcdir subdir runtests
foreach test_name [lsort [find ${srcdir}/${subdir} *.l]] {
--- 18,23 ----
Index: gas/testsuite/gas/mn10300/basic.exp
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/mn10300/basic.exp,v
retrieving revision 1.11
diff -c -3 -p -r1.11 basic.exp
*** gas/testsuite/gas/mn10300/basic.exp 5 May 2005 09:13:16 -0000 1.11
--- gas/testsuite/gas/mn10300/basic.exp 5 Jun 2007 13:55:05 -0000
*************** proc do_am33_8 {} {
*** 1768,1787 ****
if [expr $x==67] then { pass $testname } else { fail $testname }
}
- proc run_list_test { name opts } {
- global srcdir subdir
- set testname "mn10300 $name"
- set file $srcdir/$subdir/$name
- gas_run ${name}.s $opts ">&dump.out"
- if { [regexp_diff "dump.out" "${file}.l"] } then {
- fail $testname
- verbose "output is [file_contents "dump.out"]" 2
- return
- }
- pass $testname
- }
-
-
if [istarget mn10300*-*-*] then {
# Test the basic instruction parser.
do_add
--- 1768,1773 ----
Index: gas/testsuite/gas/msp430/msp430.exp
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/msp430/msp430.exp,v
retrieving revision 1.1
diff -c -3 -p -r1.1 msp430.exp
*** gas/testsuite/gas/msp430/msp430.exp 31 Dec 2002 07:40:56 -0000 1.1
--- gas/testsuite/gas/msp430/msp430.exp 5 Jun 2007 13:55:05 -0000
***************
*** 1,19 ****
#
# msp430 tests
#
- proc run_list_test { name opts } {
- global srcdir subdir
- set testname "msp430 $name"
- set file $srcdir/$subdir/$name
- gas_run ${name}.s $opts ">&dump.out"
- if { [regexp_diff "dump.out" "${file}.l"] } then {
- fail $testname
- verbose "output is [file_contents "dump.out"]" 2
- exit
- return
- }
- pass $testname
- }
if [expr [istarget "msp430-*-*"]] then {
run_dump_test "opcode"
--- 1,6 ----
Index: gas/testsuite/gas/pdp11/pdp11.exp
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/pdp11/pdp11.exp,v
retrieving revision 1.1
diff -c -3 -p -r1.1 pdp11.exp
*** gas/testsuite/gas/pdp11/pdp11.exp 5 Mar 2002 03:12:18 -0000 1.1
--- gas/testsuite/gas/pdp11/pdp11.exp 5 Jun 2007 13:55:05 -0000
***************
*** 1,19 ****
#
# pdp11/pdp11 tests
#
- proc run_list_test { name opts } {
- global srcdir subdir
- set testname "pdp11 $name"
- set file $srcdir/$subdir/$name
- gas_run ${name}.s $opts ">&dump.out"
- if { [regexp_diff "dump.out" "${file}.l"] } then {
- fail $testname
- verbose "output is [file_contents "dump.out"]" 2
- exit
- return
- }
- pass $testname
- }
if [expr [istarget "pdp11-*-*"]] then {
--- 1,6 ----
Index: gas/testsuite/gas/ppc/ppc.exp
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/ppc/ppc.exp,v
retrieving revision 1.13
diff -c -3 -p -r1.13 ppc.exp
*** gas/testsuite/gas/ppc/ppc.exp 20 Apr 2007 13:42:48 -0000 1.13
--- gas/testsuite/gas/ppc/ppc.exp 5 Jun 2007 13:55:05 -0000
***************
*** 2,20 ****
# Some PowerPC tests
#
- proc run_list_test { name opts } {
- global srcdir subdir
- set testname "ppc $name"
- set file $srcdir/$subdir/$name
- gas_run ${name}.s $opts ">&dump.out"
- if { [regexp_diff "dump.out" "${file}.l"] } then {
- fail $testname
- verbose "output is [file_contents "dump.out"]" 2
- return
- }
- pass $testname
- }
-
# These tests are currently ELF specific, only because nobody has
# converted them to look for XCOFF relocations.
--- 2,7 ----
Index: gas/testsuite/gas/s390/s390.exp
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/s390/s390.exp,v
retrieving revision 1.3
diff -c -3 -p -r1.3 s390.exp
*** gas/testsuite/gas/s390/s390.exp 6 Mar 2007 13:19:07 -0000 1.3
--- gas/testsuite/gas/s390/s390.exp 5 Jun 2007 13:55:05 -0000
***************
*** 1,19 ****
#
# s390/s390x tests
#
- proc run_list_test { name opts } {
- global srcdir subdir
- set testname "s390 $name"
- set file $srcdir/$subdir/$name
- gas_run ${name}.s $opts ">&dump.out"
- if { [regexp_diff "dump.out" "${file}.l"] } then {
- fail $testname
- verbose "output is [file_contents "dump.out"]" 2
- exit
- return
- }
- pass $testname
- }
if [expr [istarget "s390-*-*"] || [istarget "s390x-*-*"]] then {
--- 1,6 ----
Index: gas/testsuite/lib/gas-defs.exp
===================================================================
RCS file: /cvs/src/src/gas/testsuite/lib/gas-defs.exp,v
retrieving revision 1.24
diff -c -3 -p -r1.24 gas-defs.exp
*** gas/testsuite/lib/gas-defs.exp 6 Mar 2007 02:08:25 -0000 1.24
--- gas/testsuite/lib/gas-defs.exp 5 Jun 2007 13:55:05 -0000
*************** if ![string length [info proc prune_warn
*** 888,890 ****
--- 888,912 ----
return $text
}
}
+
+ # run_list_test NAME OPTS (optional): TESTNAME
+ #
+ # Assemble the file "NAME.d" with command line options OPTS and
+ # compare the assembler standard error output against thee regular
+ # expressions given in the file "NAME.l". If TESTNAME is provided,
+ # it will be used as the name of the test.
+
+ proc run_list_test { name opts {testname {}} } {
+ global srcdir subdir
+ if { [string length $testname] == 0 } then {
+ set testname "[file tail $subdir] $name"
+ }
+ set file $srcdir/$subdir/$name
+ gas_run ${name}.s $opts ">&dump.out"
+ if { [regexp_diff "dump.out" "${file}.l"] } then {
+ fail $testname
+ verbose "output is [file_contents "dump.out"]" 2
+ return
+ }
+ pass $testname
+ }