aboutsummaryrefslogtreecommitdiff
path: root/test/lib
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-04-14 16:41:39 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-04-14 16:41:39 +0000
commit520b487984b5e0048b06dddaaf30439e3ba5b7ca (patch)
treec8b72a730fba71516b367382a2392acc196a5b24 /test/lib
parentaf6676df04acdeef0ab864307e5c586fe0e50ed0 (diff)
Add the line number where the script failed to the error output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35994 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/lib')
-rw-r--r--test/lib/llvm.exp10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/lib/llvm.exp b/test/lib/llvm.exp
index 581c91f09b..780d8ff86c 100644
--- a/test/lib/llvm.exp
+++ b/test/lib/llvm.exp
@@ -4,25 +4,27 @@ proc execOneLine { test outcome lineno line } {
set retval [ catch { eval exec -keepnewline -- $line } errmsg ]
if { $retval != 0 } {
set code [lindex $::errorCode 0]
+ set lineno [expr $lineno + 1]
+ set errmsg " at RUN: line $lineno\nwhile running: $line\n$errmsg"
switch "$code" {
CHILDSTATUS {
set status [lindex $::errorCode 2]
if { $status ne 0 } {
- set resultmsg "$test: exit($status)\nwhile running: $line\n$errmsg"
+ set resultmsg "$test: exit($status)$errmsg"
}
}
CHILDKILLED {
set signal [lindex $::errorCode 2]
- set resultmsg "$test: signal($signal)\nwhile running: $line\n$errmsg"
+ set resultmsg "$test: signal($signal)$errmsg"
}
CHILDSUSP {
set signal [lindex $::errorCode 2]
- set resultmsg "$test: suspend($signal)\nwhile running: $line\n$errmsg"
+ set resultmsg "$test: suspend($signal)$errmsg"
}
POSIX {
set posixNum [lindex $::errorCode 1]
set posixMsg [lindex $::errorCode 2]
- set resultmsg "$test: posix($posixNum)\n$posixMsg\nwhile running: $line\n$errmsg"
+ set resultmsg "$test: posix($posixNum,$posixMsg)$errmsg"
}
NONE {
}