[llvm-commits] [hlvm] r38312 - /hlvm/trunk/test/lib/invalid.exp
Reid Spencer
reid at x10sys.com
Sat Jul 7 17:02:15 PDT 2007
Author: reid
Date: Sat Jul 7 19:02:15 2007
New Revision: 38312
URL: http://llvm.org/viewvc/llvm-project?rev=38312&view=rev
Log:
Fix a bug in the handling of result codes from the executed test program.
This now reliabily catches error codes instead of giving false positives.
Modified:
hlvm/trunk/test/lib/invalid.exp
Modified: hlvm/trunk/test/lib/invalid.exp
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/test/lib/invalid.exp?rev=38312&r1=38311&r2=38312&view=diff
==============================================================================
--- hlvm/trunk/test/lib/invalid.exp (original)
+++ hlvm/trunk/test/lib/invalid.exp Sat Jul 7 19:02:15 2007
@@ -47,7 +47,16 @@
set execout ""
set retval [ catch { exec -keepnewline $tool $testsrc -o $output } msg ]
if { $retval != 0 } {
- pass "$test"
+ if {[lindex $::errorCode 0] eq "CHILDSTATUS"} {
+ set status [lindex $::errorCode 2]
+ if { $status eq 0 } {
+ fail "$test: $tool return $retval\n$msg"
+ } else {
+ pass "$test"
+ }
+ } else {
+ fail "$test: $tool return $::errorCode\n$msg"
+ }
} else {
fail "$test: $tool return $retval\n$msg"
}
More information about the llvm-commits
mailing list