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
} 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
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