Currently, scan-dump variants treat a missing dump file as a failure and
append ": dump file does not exist" to the test message that would be
used with pass or fail.  This patch treats it as unresolved instead,
using the same test message as for pass/fail and reporting the reason
in the log file.

Tested with dummy tests that use all of these procs for either pass,
fail, or unresolved.  OK for trunk, and later for 4.6?

Janis
2011-06-16  Janis Johnson  <jani...@codesourcery.com>

        * lib/scandump.exp (scan-dump, scan-dump-times, scan-dump-not,
        scan-dump-dem, scan-dump-dem-not): Treat a missing dump file as
        unresolved and report the reason to the log file.

Index: lib/scandump.exp
===================================================================
--- lib/scandump.exp    (revision 175083)
+++ lib/scandump.exp    (working copy)
@@ -55,7 +55,8 @@
     set src [file tail [lindex $testcase 0]]
     set output_file "[glob -nocomplain $src.[lindex $args 2]]"
     if { $output_file == "" } {
-       fail "$testname: dump file does not exist"
+       verbose -log "$testcase: dump file does not exist"
+       unresolved "$testname"
        return
     }
 
@@ -97,7 +98,8 @@
     set src [file tail [lindex $testcase 0]]
     set output_file "[glob -nocomplain $src.[lindex $args 3]]"
     if { $output_file == "" } {
-       fail "$testname: dump file does not exist"
+       verbose -log "$testcase: dump file does not exist"
+       unresolved "$testname"
        return
     }
 
@@ -139,7 +141,8 @@
     set src [file tail [lindex $testcase 0]]
     set output_file "[glob -nocomplain $src.[lindex $args 2]]"
     if { $output_file == "" } {
-       fail "$testname: dump file does not exist"
+       verbose -log "$testcase: dump file does not exist"
+       unresolved "$testname"
        return
     }
 
@@ -190,7 +193,8 @@
     set src [file tail [lindex $testcase 0]]
     set output_file "[glob -nocomplain $src.[lindex $args 2]]"
     if { $output_file == "" } {
-       fail "$testname: dump file does not exist"
+       verbose -log "$testcase: dump file does not exist"
+       unresolved "$testname"
        return
     }
 
@@ -241,7 +245,8 @@
     set src [file tail [lindex $testcase 0]]
     set output_file "[glob -nocomplain $src.[lindex $args 2]]"
     if { $output_file == "" } {
-       fail "$testname: dump file does not exist"
+       verbose -log "$testcase: dump file does not exist"
+       unresolved "$testname"
        return
     }
 

Reply via email to