From 8d88fc5ee4b40fc83f73b81e669978d5f99bd3a8 Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Thu, 18 May 2006 19:42:16 +0000 Subject: [PATCH] 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. llvm-svn: 28385 --- llvm/test/lib/llvm-dg.exp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/llvm/test/lib/llvm-dg.exp b/llvm/test/lib/llvm-dg.exp index 918421b865c8..07dffae29c10 100644 --- a/llvm/test/lib/llvm-dg.exp +++ b/llvm/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