commit dbd4a25ef1165b87b3848ad1d7e64beb663b6329
Author:     Roberto E. Vargas Caballero <[email protected]>
AuthorDate: Fri Aug 14 22:00:13 2015 +0200
Commit:     Roberto E. Vargas Caballero <[email protected]>
CommitDate: Fri Aug 14 22:00:13 2015 +0200

    Add log of the tests

diff --git a/cc1/tests/chktest.sh b/cc1/tests/chktest.sh
index 75d2c34..bcbc1ec 100755
--- a/cc1/tests/chktest.sh
+++ b/cc1/tests/chktest.sh
@@ -2,14 +2,19 @@
 
 out=/tmp/$$.out
 chk=/tmp/$$.chk
+err=test.log
 
 trap "rm -f $out $chk" EXIT INT QUIT HUP
+rm -f $err
 
 for i in *.c
 do
        awk '
        BEGIN {
-               out="'$out'";chk="'$chk'"
+               out="'$out'"
+               chk="'$chk'"
+               err="'$err'"
+               test="'$i'"
                system("rm -f " out " " chk)
        }
        /^name:/ {
@@ -25,7 +30,9 @@ do
                print $0 >> chk
        }
        END {
-               system("../cc1 -w '$i' > " out " 2>&1")
-               print system("cmp -s " out " " chk) ? "[FAILED]" : "[OK]"
+               system("../cc1 -w " test " > " out " 2>&1")
+               cmd="diff -u " chk " " out " >> " err
+               print test >> err
+               print system(cmd) ? "[FAILED]" : "[OK]"
        }' $i
 done

Reply via email to