scanasm.exp (dg-scan, [...]): For missing file...

* lib/scanasm.exp (dg-scan, scan-assembler-times, scan-assembler-dem,
	scan-assembler-dem-not): For missing file, report unresolved with
	same message as for pass/fail, with reason reported in log file.

From-SVN: r175546
This commit is contained in:
Janis Johnson 2011-06-27 18:39:21 +00:00 committed by Janis Johnson
parent cf0a9c20a4
commit 0e0ccb0fbb
2 changed files with 41 additions and 9 deletions

View File

@ -1,5 +1,9 @@
2011-06-27 Janis Johnson <janisjo@codesourcery.com>
* lib/scanasm.exp (dg-scan, scan-assembler-times, scan-assembler-dem,
scan-assembler-dem-not): For missing file, report unresolved with
same message as for pass/fail, with reason reported in log file.
* lib/target-supports.exp (add_options_for_arm_fp16): Renamed
from add_options_for_arm_neon_fp16.
(check_effective_target_arm_fp16_ok_nocache): Renamed from

View File

@ -50,16 +50,22 @@ proc dg-scan { name positive testcase output_file orig_args } {
}
}
set pattern [lindex $orig_args 0]
set printable_pattern [make_pattern_printable $pattern]
if { [is_remote host] } {
remote_upload host "$output_file"
}
set files [glob -nocomplain $output_file]
if { $files == "" } {
verbose -log "$testcase: output file does not exist"
unresolved "$testcase $name $printable_pattern"
return
}
set fd [open $output_file r]
set text [read $fd]
close $fd
set pattern [lindex $orig_args 0]
set printable_pattern [make_pattern_printable $pattern]
set match [regexp -- $pattern $text]
if { $match == $positive } {
pass "$testcase $name $printable_pattern"
@ -202,15 +208,23 @@ proc scan-assembler-times { args } {
upvar 2 name testcase
set testcase [lindex $testcase 0]
set pattern [lindex $args 0]
set pp_pattern [make_pattern_printable $pattern]
# This must match the rule in gcc-dg.exp.
set output_file "[file rootname [file tail $testcase]].s"
set files [glob -nocomplain $output_file]
if { $files == "" } {
verbose -log "$testcase: output file does not exist"
unresolved "$testcase scan-assembler-times $pp_pattern [lindex $args 1]"
return
}
set fd [open $output_file r]
set text [read $fd]
close $fd
set pattern [lindex $args 0]
set pp_pattern [make_pattern_printable $pattern]
if { [llength [regexp -inline -all -- $pattern $text]] == [lindex $args 1]} {
pass "$testcase scan-assembler-times $pp_pattern [lindex $args 1]"
} else {
@ -253,13 +267,20 @@ proc scan-assembler-dem { args } {
upvar 2 name testcase
set testcase [lindex $testcase 0]
set pattern [lindex $args 0]
set pp_pattern [make_pattern_printable $pattern]
set output_file "[file rootname [file tail $testcase]].s"
set files [glob -nocomplain $output_file]
if { $files == "" } {
verbose -log "$testcase: output file does not exist"
unresolved "$testcase scan-assembler-dem $pp_pattern"
return
}
set output [remote_exec host "$cxxfilt" "" "$output_file"]
set text [lindex $output 1]
set pattern [lindex $args 0]
set pp_pattern [make_pattern_printable $pattern]
if [regexp -- $pattern $text] {
pass "$testcase scan-assembler-dem $pp_pattern"
} else {
@ -301,13 +322,20 @@ proc scan-assembler-dem-not { args } {
upvar 2 name testcase
set testcase [lindex $testcase 0]
set pattern [lindex $args 0]
set pp_pattern [make_pattern_printable $pattern]
set output_file "[file rootname [file tail $testcase]].s"
set files [glob -nocomplain $output_file]
if { $files == "" } {
verbose -log "$testcase: output file does not exist"
unresolved "$testcase scan-assembler-dem-not $pp_pattern"
return
}
set output [remote_exec host "$cxxfilt" "" "$output_file"]
set text [lindex $output 1]
set pattern [lindex $args 0]
set pp_pattern [make_pattern_printable $pattern]
if ![regexp -- $pattern $text] {
pass "$testcase scan-assembler-dem-not $pp_pattern"
} else {