From ea5e81bd6a3376232bf4747b2fa2e0a91c19b337 Mon Sep 17 00:00:00 2001 From: grischka Date: Sat, 18 Apr 2009 14:28:45 +0200 Subject: new subdirs: include, lib, tests --- tests/gcctestsuite.sh | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 tests/gcctestsuite.sh (limited to 'tests/gcctestsuite.sh') diff --git a/tests/gcctestsuite.sh b/tests/gcctestsuite.sh new file mode 100644 index 0000000..bd9204b --- /dev/null +++ b/tests/gcctestsuite.sh @@ -0,0 +1,33 @@ +#!/bin/sh + +TESTSUITE_PATH=$HOME/gcc/gcc-3.2/gcc/testsuite/gcc.c-torture +TCC="./tcc -B. -I. -DNO_TRAMPOLINES" +rm -f tcc.sum tcc.log +nb_failed="0" + +for src in $TESTSUITE_PATH/compile/*.c ; do + echo $TCC -o /tmp/test.o -c $src + $TCC -o /tmp/test.o -c $src >> tcc.log 2>&1 + if [ "$?" == "0" ] ; then + result="PASS" + else + result="FAIL" + nb_failed=$[ $nb_failed + 1 ] + fi + echo "$result: $src" >> tcc.sum +done + +for src in $TESTSUITE_PATH/execute/*.c ; do + echo $TCC $src + $TCC $src >> tcc.log 2>&1 + if [ "$?" == "0" ] ; then + result="PASS" + else + result="FAIL" + nb_failed=$[ $nb_failed + 1 ] + fi + echo "$result: $src" >> tcc.sum +done + +echo "$nb_failed test(s) failed." >> tcc.sum +echo "$nb_failed test(s) failed." -- cgit v1.3.1