scc

Simple C99 Compiler
Log | Files | Refs | README | LICENSE

commit dbd4a25ef1165b87b3848ad1d7e64beb663b6329
parent 4cd3b53a109cfc9c02c2ff15a8f60cb658a4b574
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Fri, 14 Aug 2015 22:00:13 +0200

Add log of the tests

Diffstat:
cc1/tests/chktest.sh | 13++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)

diff --git 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