aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-05-18 19:42:16 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-05-18 19:42:16 +0000
commit8b437e05b5918e81ef5b057e3ce9982e1dd0e392 (patch)
treed5e5b36ae2fc38ba5eadc7e89fbf7019b2ce1785
parent16abfdfc2229e61a544a75740da995c8a68e7807 (diff)
Improve error output. Use the third parameter of the "catch" command to
capture the error output from the exec option. This generally will capture the stderr messages generated by the tools. This information is then printed if the test fails. This helps to recognize more quickly what the error was. Otherwise, this information is lost. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28385 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/lib/llvm-dg.exp6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/lib/llvm-dg.exp b/test/lib/llvm-dg.exp
index 918421b865..07dffae29c 100644
--- a/test/lib/llvm-dg.exp
+++ b/test/lib/llvm-dg.exp
@@ -93,7 +93,7 @@ proc llvm-runtest { programs objdir srcdir subdir target_triplet llvmgcc llvmgxx
} else {
#run script and catch errors
- set retval [ catch {exec /bin/sh $script >& $output} ]
+ set retval [ catch {exec /bin/sh $script >& $output} errmsg ]
if { $retval == 1 } {
#Get output
@@ -105,10 +105,10 @@ proc llvm-runtest { programs objdir srcdir subdir target_triplet llvmgcc llvmgxx
switch $outcome {
PASS {
file delete $output
- fail "$test: \n$result"
+ fail "$test: \n$errmsg\n$result"
}
XFAIL {
- xfail "$test: \n$result"
+ xfail "$test: \n$errmsg\n$result"
}
default {
file delete $output