From 0e0ccb0fbba681f3ee2dbd2bac7246be3ec88a90 Mon Sep 17 00:00:00 2001 From: Janis Johnson Date: Mon, 27 Jun 2011 18:39:21 +0000 Subject: [PATCH] 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 --- gcc/testsuite/ChangeLog | 4 +++ gcc/testsuite/lib/scanasm.exp | 46 ++++++++++++++++++++++++++++------- 2 files changed, 41 insertions(+), 9 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d288bcbdd88..462765229df 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,9 @@ 2011-06-27 Janis Johnson + * 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 diff --git a/gcc/testsuite/lib/scanasm.exp b/gcc/testsuite/lib/scanasm.exp index 80014d0195c..73eb396b2c3 100644 --- a/gcc/testsuite/lib/scanasm.exp +++ b/gcc/testsuite/lib/scanasm.exp @@ -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 { -- 2.30.2