From: Ben Elliston Date: Sun, 20 Mar 2016 06:05:32 +0000 (+1100) Subject: * lib/dg.exp (dg-test): There is no need to call unresolved to X-Git-Tag: upstream/1.6.2~141 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1992ceaf6d309d0fce0d8d130014d2a8419c9234;p=platform%2Fupstream%2Fdejagnu.git * lib/dg.exp (dg-test): There is no need to call unresolved to clear errcnt. Instead, pass 0 as argument 2 to perror. * runtest.exp (runtest): Likewise. --- diff --git a/ChangeLog b/ChangeLog index 125f3d4..7d53138 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2016-03-20 Ben Elliston + + * lib/dg.exp (dg-test): There is no need to call unresolved to + clear errcnt. Instead, pass 0 as argument 2 to perror. + * runtest.exp (runtest): Likewise. + 2016-03-16 Ben Elliston Revert this change (the GCC testsuite uses diff): diff --git a/lib/dg.exp b/lib/dg.exp index 0114c76..85c5d3f 100644 --- a/lib/dg.exp +++ b/lib/dg.exp @@ -686,9 +686,7 @@ proc dg-test { args } { } else { perror "$name: $errmsg for \"$op\"\n" } - # ??? The call to unresolved here is necessary to clear `errcnt'. - # What we really need is a proc like perror that doesn't set errcnt. - unresolved "$name: $errmsg for \"$op\"" + perror "$name: $errmsg for \"$op\"" 0 return } } @@ -875,10 +873,7 @@ proc dg-test { args } { verbose "Running dg-final tests." 3 verbose "dg-final-proc:\n[info body dg-final-proc]" 4 if {[catch "dg-final-proc $prog" errmsg]} { - perror "$name: error executing dg-final: $errmsg" - # ??? The call to unresolved here is necessary to clear `errcnt'. - # What we really need is a proc like perror that doesn't set errcnt. - unresolved "$name: error executing dg-final: $errmsg" + perror "$name: error executing dg-final: $errmsg" 0 } } diff --git a/runtest.exp b/runtest.exp index d7facf8..2252bec 100644 --- a/runtest.exp +++ b/runtest.exp @@ -1499,13 +1499,7 @@ proc runtest { test_file_name } { } else { # This should never happen, but maybe if the file got removed # between the `find' above and here. - perror "$test_file_name does not exist." - # ??? This is a hack. We want to send a message to stderr and - # to the summary file (just like perror does), but we don't - # want the next testcase to get a spurious "unresolved" because - # errcnt != 0. Calling `clone_output' is also supposed to be a - # no-no (see the comments for clone_output). - set errcnt 0 + perror "$test_file_name does not exist." 0 } }