gcctestsuite.sh 752 B

12345678910111213141516171819202122232425262728293031323334
  1. #!/bin/sh
  2. TESTSUITE_PATH=$HOME/gcc/gcc-3.2/gcc/testsuite/gcc.c-torture
  3. TCC="./tcc -B. -I. -DNO_TRAMPOLINES"
  4. rm -f tcc.sum tcc.log
  5. nb_failed="0"
  6. for src in $TESTSUITE_PATH/compile/*.c ; do
  7. echo $TCC -o /tmp/test.o -c $src
  8. $TCC -o /tmp/test.o -c $src >> tcc.log 2>&1
  9. if [ "$?" = "0" ] ; then
  10. result="PASS"
  11. else
  12. result="FAIL"
  13. nb_failed=$(( $nb_failed + 1 ))
  14. fi
  15. echo "$result: $src" >> tcc.sum
  16. done
  17. for src in $TESTSUITE_PATH/execute/*.c ; do
  18. echo $TCC $src
  19. $TCC $src >> tcc.log 2>&1
  20. if [ "$?" = "0" ] ; then
  21. result="PASS"
  22. else
  23. result="FAIL"
  24. nb_failed=$(( $nb_failed + 1 ))
  25. fi
  26. echo "$result: $src" >> tcc.sum
  27. done
  28. echo "$nb_failed test(s) failed." >> tcc.sum
  29. echo "$nb_failed test(s) failed."