ref: dbd4a25ef1165b87b3848ad1d7e64beb663b6329
parent: 4cd3b53a109cfc9c02c2ff15a8f60cb658a4b574
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Fri Aug 14 18:00:13 EDT 2015
Add log of the tests
--- 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 @@
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