[hackers] [scc] Add log of the tests || Roberto E. Vargas Caballero
commit dbd4a25ef1165b87b3848ad1d7e64beb663b6329
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Fri Aug 14 22:00:13 2015 +0200
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
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
_AT_@ -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:/ {
_AT_@ -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
Received on Fri Aug 14 2015 - 23:22:50 CEST
This archive was generated by hypermail 2.3.0
: Fri Aug 14 2015 - 23:24:14 CEST