forked from OSchip/llvm-project
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
This commit is contained in:
parent
4cda95b32f
commit
8d88fc5ee4
|
@ -93,7 +93,7 @@ proc llvm-runtest { programs objdir srcdir subdir target_triplet llvmgcc llvmgxx
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
#run script and catch errors
|
#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 } {
|
if { $retval == 1 } {
|
||||||
#Get output
|
#Get output
|
||||||
|
@ -105,10 +105,10 @@ proc llvm-runtest { programs objdir srcdir subdir target_triplet llvmgcc llvmgxx
|
||||||
switch $outcome {
|
switch $outcome {
|
||||||
PASS {
|
PASS {
|
||||||
file delete $output
|
file delete $output
|
||||||
fail "$test: \n$result"
|
fail "$test: \n$errmsg\n$result"
|
||||||
}
|
}
|
||||||
XFAIL {
|
XFAIL {
|
||||||
xfail "$test: \n$result"
|
xfail "$test: \n$errmsg\n$result"
|
||||||
}
|
}
|
||||||
default {
|
default {
|
||||||
file delete $output
|
file delete $output
|
||||||
|
|
Loading…
Reference in New Issue