1 # Copyright
(C
) 1993, 1994, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
2 #
2004, 2005, 2007, 2008, 2009, 2010 Free Software Foundation
, Inc.
4 # This
program is free software
; you can redistribute it and
/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation
; either version
3 of the License
, or
7 #
(at your option
) any later version.
9 # This
program is distributed in the hope that it will be useful
,
10 # but WITHOUT
ANY WARRANTY
; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License
for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this
program; if not
, write to the Free Software
16 # Foundation
, Inc.
, 51 Franklin Street
- Fifth Floor
, Boston
,
19 # Please email
any bugs
, comments
, and
/or additions to this file to
:
22 # This file was written by Ken Raeburn
(raeburn@cygnus.com
).
24 proc load_common_lib
{ name } {
26 load_file $srcdir
/..
/..
/binutils
/testsuite
/lib
/$
name
29 load_common_lib binutils
-common.exp
33 if [is_remote host
] then {
34 remote_exec host
"$AS -version < /dev/null" "" "" "gas.version"
35 remote_exec host
"which $AS" "" "" "gas.which"
37 remote_upload host
"gas.version"
38 remote_upload host
"gas.which"
40 set which_as
[file_contents
"gas.which"]
41 set tmp
[file_contents
"gas.version"]
43 remote_file build
delete "gas.version"
44 remote_file build
delete "gas.which"
45 remote_file host
delete "gas.version"
46 remote_file host
delete "gas.which"
48 set which_as
[which $AS
]
49 catch
"exec $AS -version < /dev/null" tmp
52 # Should find a way to discard constant parts
, keep whatever
's
53 # left, so the version string could be almost anything at all...
54 regexp "\[^\n\]* (cygnus-|)(\[-0-9.a-zA-Z-\]+)\[\r\n\].*" $tmp version cyg number
55 if ![info exists number] then {
56 return "$which_as (no version number)\n"
58 clone_output "$which_as $number\n"
62 proc gas_host_run { cmd redir } {
63 verbose "Executing $cmd $redir"
64 set return_contents_of ""
65 if [regexp ">& */dev/null" $redir] then {
67 set command "$cmd $redir"
68 } elseif [regexp "> */dev/null" $redir] then {
70 set command "$cmd 2>gas.stderr"
71 set return_contents_of "gas.stderr"
72 } elseif [regexp ">&.*" $redir] then {
73 # See PR 5322 for why the following line is used.
74 regsub ">&" $redir "" output_file
75 set command "$cmd 2>&1"
76 } elseif [regexp "2>.*" $redir] then {
77 set output_file "gas.out"
78 set command "$cmd $redir"
79 set return_contents_of "gas.out"
80 } elseif [regexp ">.*" $redir] then {
82 set command "$cmd $redir 2>gas.stderr"
83 set return_contents_of "gas.stderr"
84 } elseif { "$redir" == "" } then {
85 set output_file "gas.out"
86 set command "$cmd 2>&1"
87 set return_contents_of "gas.out"
89 fail "gas_host_run: unknown form of redirection string"
92 set status [remote_exec host [concat sh -c [list $command]] "" "/dev/null" "$output_file"]
94 if { "$return_contents_of" != "" } then {
95 remote_upload host "$return_contents_of"
96 set to_return [file_contents "$return_contents_of"]
97 regsub "\n$" $to_return "" to_return
100 if { [lindex $status 0] == 0 && "$output_file" != ""
101 && "$output_file" != "$return_contents_of" } then {
102 remote_upload host "$output_file"
105 return [list [lindex $status 0] "$to_return"]
108 proc gas_run { prog as_opts redir } {
116 set status [gas_host_run "$AS $ASFLAGS $as_opts $srcdir/$subdir/$prog" "$redir"]
117 set comp_output [lindex $status 1]
118 if { [lindex $status 0] != 0 && [regexp "2>.*" $redir] } then {
119 append comp_output "child process exited abnormally"
121 set comp_output [prune_warnings $comp_output]
122 verbose "output was $comp_output"
123 return [list $comp_output ""]
126 proc gas_run_stdin { prog as_opts redir } {
134 set status [gas_host_run "$AS $ASFLAGS $as_opts < $srcdir/$subdir/$prog" "$redir"]
135 set comp_output [lindex $status 1]
136 if { [lindex $status 0] != 0 && [regexp "2>.*" $redir] } then {
137 append comp_output "child process exited abnormally"
139 set comp_output [prune_warnings $comp_output]
140 verbose "output was $comp_output"
141 return [list $comp_output ""]
144 proc all_ones { args } {
145 foreach x $args { if [expr $x!=1] { return 0 } }
149 # ${tool}_finish (gas_finish) will be called by runtest.exp. But
150 # gas_finish should only be used with gas_start. We use gas_started
151 # to tell gas_finish if gas_start has been called so that runtest.exp
152 # can call gas_finish without closing the wrong fd.
155 proc gas_start { prog as_opts } {
165 verbose -log "Starting $AS $ASFLAGS $as_opts $prog" 2
166 set status [gas_host_run "$AS $ASFLAGS $as_opts $srcdir/$subdir/$prog" ">&gas.out"]
167 spawn -noecho -nottycopy cat gas.out
170 proc gas_finish { } {
174 if { $gas_started == 1 } {
181 proc want_no_output { testname } {
184 if ![string match "" $comp_output] then {
185 send_log "$comp_output\n"
186 verbose "$comp_output" 3
188 if [string match "" $comp_output] then {
197 proc gas_test_old { file as_opts testname } {
198 gas_run $file $as_opts ""
199 return [want_no_output $testname]
202 proc gas_test { file as_opts var_opts testname } {
206 foreach word $var_opts {
207 set ignore_stdout($i) [string match "*>" $word]
208 set opt($i) [string trim $word {>}]
212 for {set i 0} {[expr $i<$max]} {incr i} {
213 set maybe_ignore_stdout ""
215 for {set bit 0} {(1<<$bit)<$max} {incr bit} {
216 set num [expr 1<<$bit]
217 if [expr $i&$num] then {
218 set extra_opts "$extra_opts $opt($bit)"
219 if $ignore_stdout($bit) then {
220 set maybe_ignore_stdout ">/dev/null"
224 set extra_opts [string trim $extra_opts]
225 gas_run $file "$as_opts $extra_opts" $maybe_ignore_stdout
227 # Should I be able to use a conditional expression here?
228 if [string match "" $extra_opts] then {
229 want_no_output $testname
231 want_no_output "$testname ($extra_opts)"
234 if [info exists errorInfo] then {
239 proc gas_test_ignore_stdout { file as_opts testname } {
242 gas_run $file $as_opts ">/dev/null"
243 want_no_output $testname
246 proc gas_test_error { file as_opts testname } {
249 gas_run $file $as_opts ">/dev/null"
250 send_log "$comp_output\n"
251 verbose "$comp_output" 3
252 if { ![string match "" $comp_output]
253 && ![string match "*Assertion failure*" $comp_output]
254 && ![string match "*Internal error*" $comp_output] } then {
263 proc gas_init { args } {
265 global target_cpu_family
271 case "$target_cpu" in {
272 "m68???" { set target_cpu_family m68k }
273 "i[3-7]86" { set target_cpu_family i386 }
274 default { set target_cpu_family $target_cpu }
277 set target_family "$target_cpu_family-$target_vendor-$target_os"
280 if ![istarget "*-*-*"] {
281 perror "Target name [istarget] is not a triple."
283 # Need to return an empty string.
287 # Internal procedure: return the names of the standard sections
289 proc get_standard_section_names {} {
290 if [istarget "rx-*-*"] {
291 return { "P" "D_1" "B_1" }
293 if [istarget "alpha*-*-*vms*"] {
294 # Double quote: for TCL and for sh.
295 return { "\\\$CODE\\\$" "\\\$DATA\\\$" "\\\$BSS\\\$" }
300 # run_dump_tests TESTCASES EXTRA_OPTIONS
301 # Wrapper for run_dump_test, which is suitable for invoking as
302 # run_dump_tests [lsort [glob -nocomplain $srcdir/$subdir/*.d]]
303 # EXTRA_OPTIONS are passed down to run_dump_test. Honors runtest_file_p.
304 # Body cribbed from dg-runtest.
306 proc run_dump_tests { testcases {extra_options {}} } {
309 foreach testcase $testcases {
310 # If testing specific files and this isn't one of them
, skip it.
311 if ![runtest_file_p $runtests $testcase
] {
314 run_dump_test
[file rootname
[file tail $testcase
]] $extra_options
319 # run_dump_test FILE
(optional
:) EXTRA_OPTIONS
321 # Assemble a .s file
, then run some utility
on it and check the output.
323 # There should be an assembly language file named FILE.s in the test
324 # suite directory
, and a pattern file called FILE.d. `run_dump_test
'
325 # will assemble FILE.s, run some tool like `objdump', `objcopy
', or
326 # `nm' on the .o file to produce textual output
, and
then analyze that
327 # with regexps. The FILE.d file specifies what
program to run
, and
328 # what to expect in its output.
330 # The FILE.d file begins with zero or more option lines
, which specify
331 # flags to pass to the assembler
, the
program to run to dump the
332 # assembler
's output, and the options it wants. The option lines have
337 # OPTION is the name of some option, like "name" or "objdump", and
338 # VALUE is OPTION's value. The valid options are described below.
339 # Whitespace is ignored everywhere
, except within VALUE. The option
340 # list ends with the first line that doesn
't match the above syntax.
341 # However, a line within the options that begins with a #, but doesn't
342 # have a recognizable option
name followed by a colon
, is considered a
343 # comment and entirely ignored.
345 # The optional EXTRA_OPTIONS
argument to `run_dump_test
' is a list of
346 # two-element lists. The first element of each is an option name, and
347 # the second additional arguments to be added on to the end of the
348 # option list as given in FILE.d. (If omitted, no additional options
351 # The interesting options are:
354 # The name of this test, passed to DejaGNU's `pass
' and `fail'
355 # commands.
If omitted
, this defaults to FILE
, the root of the
356 # .s and .d files
' names.
359 # When assembling FILE.s, pass FLAGS to the assembler.
366 # Use the specified program to analyze the .o file, and pass it
367 # FLAGS, in addition to the .o file name. Note that they are run
368 # with LC_ALL=C in the environment to give consistent sorting
369 # of symbols. If no FLAGS are needed then use:
370 # PROG: [nm objcopy objdump readelf addr2line]
372 # Note: for objdump, we automatically replaces the standard section
373 # names (.text, .data and .bss) by target ones if any (eg. rx-elf
374 # uses "P" instead of .text). The substition is done for both
375 # the objdump options (eg: "-j .text" is replaced by "-j P") and the
379 # Assemble the file SOURCE.s. If omitted, this defaults to FILE.s.
380 # This is useful if several .d files want to share a .s file.
383 # Match against DUMP.d. If omitted, this defaults to FILE.d. This
384 # is useful if several .d files differ by options only. Options are
385 # always read from FILE.d.
388 # Run this test only on a specified list of targets. More precisely,
389 # each glob in the space-separated list is passed to "istarget"; if
390 # it evaluates true for any of them, the test will be run, otherwise
391 # it will be marked unsupported.
393 # not-target: GLOBS...
394 # Do not run this test on a specified list of targets. Again,
395 # the each glob in the space-separated list is passed to
396 # "istarget", and the test is run if it evaluates *false* for
397 # *all* of them. Otherwise it will be marked unsupported.
401 # These are exactly the same as "not-target" and "target",
402 # respectively, except that they do nothing at all if the check
403 # fails. They should only be used in groups, to construct a single
404 # test which is run on all targets but with variant options or
405 # expected output on some targets. (For example, see
406 # gas/arm/inst.d and gas/arm/wince_inst.d.)
409 # An error with message matching REGEX must be emitted for the test
410 # to pass. The PROG, objdump, nm and objcopy options have no
411 # meaning and need not supplied if this is present.
414 # Expect a gas warning matching REGEX. It is an error to issue
415 # both "error" and "warning".
418 # FILE contains regexp lines to be matched against the diagnostic
419 # output of the assembler. This does not preclude the use of
420 # PROG, nm, objdump, or objcopy.
423 # Means the same as 'stderr
', but also indicates that the assembler
424 # is expected to exit unsuccessfully (therefore PROG, objdump, nm,
425 # and objcopy have no meaning and should not be supplied).
428 # Means that the section substitution for objdump is disabled.
430 # Each option may occur at most once.
432 # After the option lines come regexp lines. `run_dump_test' calls
433 # `regexp_diff
' to compare the output of the dumping tool against the
434 # regexps in FILE.d. `regexp_diff' is defined in binutils
-common.exp
;
435 # see further comments there.
437 proc run_dump_test
{ name {extra_options
{}} } {
439 global OBJDUMP NM AS OBJCOPY READELF
440 global OBJDUMPFLAGS NMFLAGS ASFLAGS OBJCOPYFLAGS READELFFLAGS
441 global ADDR2LINE ADDR2LINEFLAGS
445 if [string match
"*/*" $name] {
447 set name [file tail $
name]
449 set file
"$srcdir/$subdir/$name"
451 set opt_array
[slurp_options
"${file}.d"]
452 if { $opt_array
== -1 } {
453 perror
"error reading options from $file.d"
454 unresolved $subdir
/$
name
457 set opts
(addr2line
) {}
469 set opts
(error
-output
) {}
472 set opts
(not
-target
) {}
474 set opts
(not
-skip
) {}
475 set opts
(section
-subst
) {}
477 foreach i $opt_array
{
478 set opt_name
[lindex $i
0]
479 set opt_val
[lindex $i
1]
480 if ![info exists opts
($opt_name
)] {
481 perror
"unknown option $opt_name in file $file.d"
482 unresolved $subdir
/$
name
485 if [string length $opts
($opt_name
)] {
486 perror
"option $opt_name multiply set in $file.d"
487 unresolved $subdir
/$
name
490 if { $opt_name
== "as" } {
491 set opt_val
[subst $opt_val
]
493 set opts
($opt_name
) $opt_val
496 foreach i $extra_options
{
497 set opt_name
[lindex $i
0]
498 set opt_val
[lindex $i
1]
499 if ![info exists opts
($opt_name
)] {
500 perror
"unknown option $opt_name given in extra_opts"
501 unresolved $subdir
/$
name
504 # add extra option to end of existing option
, adding space
506 if [string length $opts
($opt_name
)] {
507 append opts
($opt_name
) " "
509 append opts
($opt_name
) $opt_val
512 if { $opts
(name) == "" } {
513 set testname
"$subdir/$name"
515 set testname $opts
(name)
517 verbose
"Testing $testname"
519 if { (($opts
(warning
) != "") && ($opts(error) != "")) \
520 ||
(($opts
(warning
) != "") && ($opts(stderr) != "")) \
521 ||
(($opts
(error
-output
) != "") && ($opts(stderr) != "")) \
522 ||
(($opts
(error
-output
) != "") && ($opts(error) != "")) \
523 ||
(($opts
(error
-output
) != "") && ($opts(warning) != "")) } {
524 perror
"$testname: bad mix of stderr, error-output, error, and warning test-directives"
528 if { $opts
(error
-output
) != "" } then {
529 set opts
(stderr
) $opts
(error
-output
)
533 # It
's meaningless to require an output-testing method when we
535 if { $opts(error) == "" && $opts(error-output) == "" } {
536 if {$opts(PROG) != ""} {
537 switch -- $opts(PROG) {
538 addr2line { set program addr2line }
539 objdump { set program objdump }
540 nm { set program nm }
541 objcopy { set program objcopy }
542 readelf { set program readelf }
544 perror "unrecognized program option $opts(PROG) in $file.d"
549 # Guess which program to run, by seeing which option was specified.
550 foreach p {objdump objcopy nm readelf addr2line} {
551 if {$opts($p) != ""} {
552 if {$program != ""} {
553 perror "ambiguous dump program in $file.d"
562 if { $program == "" && $opts(warning) == "" } {
563 perror "dump program unspecified in $file.d"
569 # Handle skipping the test on specified targets.
570 # You can have both skip/not-skip and target/not-target, but you can't
571 # have both skip and not
-skip
, or target and not
-target
, in the same file.
572 if { $opts
(skip
) != "" } then {
573 if { $opts
(not
-skip
) != "" } then {
574 perror
"$testname: mixing skip and not-skip directives is invalid"
578 foreach glob $opts
(skip
) {
579 if {[istarget $glob
]} { return }
582 if { $opts
(not
-skip
) != "" } then {
584 foreach glob $opts
(not
-skip
) {
585 if {[istarget $glob
]} {
590 if {$skip
} { return }
592 if { $opts
(target
) != "" } then {
593 if { $opts
(not
-target
) != "" } then {
594 perror
"$testname: mixing target and not-target directives is invalid"
599 foreach glob $opts
(target
) {
600 if {[istarget $glob
]} {
606 unsupported $testname
610 if { $opts
(not
-target
) != "" } then {
611 foreach glob $opts
(not
-target
) {
612 if {[istarget $glob
]} {
613 unsupported $testname
620 if { $opts
(source
) == "" } {
621 set sourcefile $
{file
}.s
623 set sourcefile $srcdir
/$subdir
/$opts
(source
)
626 if { $opts
(dump
) == "" } {
627 set dumpfile $
{file
}.d
629 set dumpfile $srcdir
/$subdir
/$opts
(dump
)
632 set cmd
"$AS $ASFLAGS $opts(as) -o dump.o $sourcefile"
634 set status [gas_host_run $cmd
""]
635 set cmdret
[lindex $
status 0]
636 set comp_output
[prune_warnings
[lindex $
status 1]]
638 set expmsg $opts
(error
)
639 if { $opts
(warning
) != "" } {
640 set expmsg $opts
(warning
)
642 if { $cmdret
!= 0 || $comp_output
!= "" || $expmsg != "" } then {
643 #
If the executed
program writes to stderr and stderr is not
644 # redirected
, exec
*always
* returns failure
, regardless of the
645 #
program exit code. Thankfully
, we can
retrieve the true
646 #
return status from a special
variable. Redirection would
647 # cause a tcl
-specific message to be appended
, and we
'd rather
648 # not deal with that if we can help it.
650 if { $cmdret != 0 && [lindex $errorCode 0] == "NONE" } {
654 set exitstat "succeeded"
655 if { $cmdret != 0 } { set exitstat "failed" }
657 send_log "$comp_output\n"
658 verbose "$comp_output" 3
659 if { $opts(stderr) == "" } then {
660 if { [regexp $expmsg $comp_output] \
661 && (($cmdret == 0) == ($opts(warning) != "")) } {
662 # We have the expected output from gas.
663 # Return if there's nothing more to
do.
664 if { $opts
(error
) != "" || $program == "" } {
669 verbose
-log "$exitstat with: <$comp_output>, expected: <$expmsg>"
675 catch
{write_file dump.stderr
"$comp_output"} write_output
676 if ![string match
"" $write_output] then {
677 send_log
"error writing dump.stderr: $write_output\n"
678 verbose
"error writing dump.stderr: $write_output" 3
679 send_log
"$comp_output\n"
680 verbose
"$comp_output" 3
684 set stderrfile $srcdir
/$subdir
/$opts
(stderr
)
685 verbose
"wrote pruned stderr to dump.stderr" 3
686 if { [regexp_diff
"dump.stderr" "$stderrfile"] } then {
687 if { $opts
(error
) != "" } {
688 verbose
-log "$exitstat with: <$comp_output>, expected: <$opts(error)>"
689 if [regexp $opts
(error
) $comp_output
] {
695 verbose
"pruned stderr is [file_contents "dump.stderr"]" 2
697 } elseif
{ $opts
(error
-output
) != "" } then {
703 if { $opts
(error
) != "" || $opts(error-output) != "" } {
708 if { $
program == "" } {
711 set progopts1 $opts
($
program)
712 eval
set progopts \$
[string toupper $
program]FLAGS
713 eval
set binary \$
[string toupper $
program]
715 if { ![is_remote host
] && [which $binary
] == 0 } {
720 #
For objdump
, automatically
translate standard section names to the targets one
,
721 #
if they are different.
722 set sect_names
[get_standard_section_names
]
723 if { $sect_names
!= "" && $program == "objdump" && $opts(section-subst) == ""} {
724 regsub
-- "-j \\.text" $progopts1 "-j [lindex $sect_names 0]" progopts1
725 regsub
-- "-j \\.data" $progopts1 "-j [lindex $sect_names 1]" progopts1
726 regsub
-- "-j \\.bss" $progopts1 "-j [lindex $sect_names 2]" progopts1
729 if { $progopts1
== "" } { set $progopts1 "-r" }
730 verbose
"running $binary $progopts $progopts1" 3
732 # Objcopy
, unlike the other two
, won
't send its output to stdout,
733 # so we have to run it specially.
734 set cmd "$binary $progopts $progopts1 dump.o"
735 set redir ">dump.out"
736 if { $program == "objcopy" } {
737 set cmd "$binary $progopts $progopts1 dump.o dump.out"
741 # Ensure consistent sorting of symbols
742 if {[info exists env(LC_ALL)]} {
743 set old_lc_all $env(LC_ALL)
747 set status [gas_host_run "$cmd" "$redir"]
748 set comp_output [prune_warnings [lindex $status 1]]
749 if {[info exists old_lc_all]} {
750 set env(LC_ALL) $old_lc_all
754 set comp_output [prune_warnings $comp_output]
755 if ![string match "" $comp_output] then {
756 send_log "$comp_output\n"
761 # Create the substition list only for objdump reference.
762 if { $sect_names != "" && $program == "objdump" } {
763 # Some testcases use ".text" while others use "\.text".
764 set regexp_subst [list "\\\\?\\.text" [lindex $sect_names 0] \
765 "\\\\?\\.data" [lindex $sect_names 1] \
766 "\\\\?\\.bss" [lindex $sect_names 2] ]
771 verbose_eval {[file_contents "dump.out"]} 3
772 if { [regexp_diff "dump.out" "${dumpfile}" $regexp_subst] } then {
774 verbose "output is [file_contents "dump.out"]" 2
781 proc slurp_options { file } {
782 if [catch { set f [open $file r] } x] {
783 #perror "couldn't open `$file
': $x"
788 # whitespace expression
791 # whitespace is ignored anywhere except within the options list;
792 # option names are alphabetic plus dash
793 set pat "^#${ws}(\[a-zA-Z0-9-\]*)$ws:${ws}(.*)$ws\$"
794 while { [gets $f line] != -1 } {
795 set line [string trim $line]
796 # Whitespace here is space-tab.
797 if [regexp $pat $line xxx opt_name opt_val] {
799 lappend opt_array [list $opt_name $opt_val]
800 } elseif {![regexp "^#" $line ]} {
808 proc objdump { opts } {
813 set status [gas_host_run "$OBJDUMP $opts" ""]
814 set comp_output [prune_warnings [lindex $status 1]]
815 verbose "objdump output=$comp_output\n" 3
818 proc objdump_start_no_subdir { prog opts } {
823 verbose "Starting $OBJDUMP $opts $prog" 2
824 set status [gas_host_run "$OBJDUMP $opts $prog" ">&gas.out"]
825 spawn -noecho -nottycopy cat gas.out
828 proc objdump_finish { } {
835 # Default timeout is 10 seconds, loses on a slow machine. But some
836 # configurations of dejagnu may override it.
837 if {$timeout<120} then { set timeout 120 }
840 timeout { perror "timeout" }
841 "virtual memory exhausted" { perror "virtual memory exhausted" }
842 buffer_full { perror "buffer full" }
846 proc file_contents { filename } {
847 set file [open $filename r]
848 set contents [read $file]
853 proc write_file { filename contents } {
854 set file [open $filename w]
855 puts $file "$contents"
859 proc verbose_eval { expr { level 1 } } {
861 if $verbose>$level then { eval verbose "$expr" $level }
864 # This definition is taken from an unreleased version of DejaGnu. Once
865 # that version gets released, and has been out in the world for a few
866 # months at least, it may be safe to delete this copy.
867 if ![string length [info proc prune_warnings]] {
869 # prune_warnings -- delete various system verbosities from TEXT.
872 # ld.so: warning: /usr/lib/libc.so.1.8.1 has older revision than expected 9
874 # Sites with particular verbose os's may wish to override this in site.exp.
876 proc prune_warnings
{ text } {
877 # This is from sun4
's. Do it for all machines for now.
878 # The "\\1" is to try to preserve a "\n" but only if necessary.
879 regsub -all "(^|\n)(ld.so: warning:\[^\n\]*\n?)+" $text "\\1" text
881 # It might be tempting to get carried away and delete blank lines, etc.
882 # Just delete *exactly* what we're ask to
, and that
's it.
887 # run_list_test NAME (optional): OPTS TESTNAME
889 # Assemble the file "NAME.s" with command line options OPTS and
890 # compare the assembler standard error output against the regular
891 # expressions given in the file "NAME.l". If TESTNAME is provided,
892 # it will be used as the name of the test.
894 proc run_list_test { name {opts {}} {testname {}} } {
896 if { [string length $testname] == 0 } then {
897 set testname "[file tail $subdir] $name"
899 set file $srcdir/$subdir/$name
900 gas_run ${name}.s $opts ">&dump.out"
901 if { [regexp_diff "dump.out" "${file}.l"] } then {
903 verbose "output is [file_contents "dump.out"]" 2
909 # run_list_test_stdin NAME (optional): OPTS TESTNAME
911 # Similar to run_list_test, but use stdin as input.
913 proc run_list_test_stdin { name {opts {}} {testname {}} } {
915 if { [string length $testname] == 0 } then {
916 set testname "[file tail $subdir] $name"
918 set file $srcdir/$subdir/$name
919 gas_run_stdin ${name}.s $opts ">&dump.out"
920 if { [regexp_diff "dump.out" "${file}.l"] } then {
922 verbose "output is [file_contents "dump.out"]" 2