Line 901... |
Line 901... |
}
|
}
|
}
|
}
|
|
|
# List contains test-items with 3 items followed by 2 lists, one item and
|
# List contains test-items with 3 items followed by 2 lists, one item and
|
# one optional item:
|
# one optional item:
|
# 0:name 1:ld/ar options 2:assembler options
|
# 0:name
|
# 3:filenames of assembler files 4: action and options. 5: name of output file
|
# 1:ld/ar options
|
|
# 2:assembler options
|
|
# 3:filenames of assembler files
|
|
# 4:list of actions, options and expected outputs.
|
|
# 5:name of output file
|
# 6:compiler flags (optional)
|
# 6:compiler flags (optional)
|
#
|
#
|
# Actions:
|
# Actions: { command command-line-options file-containg-expected-output-regexps }
|
# objdump: Apply objdump options on result. Compare with regex (last arg).
|
# Commands:
|
# nm: Apply nm options on result. Compare with regex (last arg).
|
# objdump: Apply objdump options on result.
|
# readelf: Apply readelf options on result. Compare with regex (last arg).
|
# nm: Apply nm options on result.
|
|
# readelf: Apply readelf options on result.
|
# ld: Don't apply anything on result. Compare output during linking with
|
# ld: Don't apply anything on result. Compare output during linking with
|
# regex (second arg). Note that this *must* be the first action if it
|
# the file containing regexps (which is the second arg, not the third).
|
# is to be used at all; in all other cases, any output from the linker
|
# Note that this *must* be the first action if it is to be used at all;
|
# during linking is treated as a sign of an error and FAILs the test.
|
# in all other cases, any output from the linker during linking is
|
|
# treated as a sign of an error and FAILs the test.
|
#
|
#
|
proc run_ld_link_tests { ldtests } {
|
proc run_ld_link_tests { ldtests } {
|
global ld
|
global ld
|
global as
|
global as
|
global nm
|
global nm
|
Line 1017... |
Line 1023... |
break
|
break
|
}
|
}
|
}
|
}
|
|
|
if { $action == "ld" } {
|
if { $action == "ld" } {
|
set dumpfile [lindex $actionlist 1]
|
set regexpfile $progopts
|
verbose "dumpfile is $dumpfile"
|
verbose "regexpfile is $srcdir/$subdir/$regexpfile"
|
set_file_contents "tmpdir/ld.messages" "$ld_output"
|
set_file_contents "tmpdir/ld.messages" "$ld_output"
|
verbose "ld.messages has '[file_contents tmpdir/ld.messages]'"
|
verbose "ld.messages has '[file_contents tmpdir/ld.messages]'"
|
if { [regexp_diff "tmpdir/ld.messages" "$srcdir/$subdir/$dumpfile"] } then {
|
if { [regexp_diff "tmpdir/ld.messages" "$srcdir/$subdir/$regexpfile"] } then {
|
verbose "output is $ld_output" 2
|
verbose "output is $ld_output" 2
|
set failed 1
|
set failed 1
|
break
|
break
|
}
|
}
|
set maybe_failed 0
|
set maybe_failed 0
|