Fix a bug with diffing the wrong files. Make output more readable.

llvm-svn: 28542
This commit is contained in:
Reid Spencer 2006-05-29 18:09:38 +00:00
parent c194e7e843
commit 131ca2869c
1 changed files with 7 additions and 7 deletions

View File

@ -31,6 +31,7 @@ proc llvm2cpp-test { files } {
set executable [file join Output $filename.exe]
set output [file join Output $filename.gen]
set assembly [file join Output $filename.asm]
set testname [file rootname $filename]
set retval [ catch {
exec -keepnewline $llvmas $test -o - | $llvmdis -f -o $assembly } msg ]
@ -41,7 +42,7 @@ proc llvm2cpp-test { files } {
}
set retval [ catch {
exec -keepnewline $llvm2cpp -f -o $generated $test } msg]
exec -keepnewline $llvm2cpp -f -o $generated < $test } msg]
if { $retval != 0 } {
fail "$test: llvm2cpp returned $retval\n$msg"
@ -55,19 +56,18 @@ proc llvm2cpp-test { files } {
continue
}
set retval [ catch {
exec -keepnewline $executable > $output } msg ]
set retval [ catch { exec -keepnewline $executable > $output } msg ]
if { $retval != 0 } {
fail "$test: $filename returned $retval\n$msg"
set execname [file tail $executable]
fail "$test: $execname returned $retval:\n$msg"
continue
}
set retval [ catch {
exec -keepnewline diff -u $assembly $generated } msg ]
exec -keepnewline diff $assembly $output } msg ]
if { $retval != 0 } {
fail "$test: diff returned $retval\n$msg"
fail "$test: diff returned $retval:\n$msg"
continue
}
pass "$test"