scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | README | LICENSE

chktest.sh (410B)


      1 #!/bin/sh
      2 
      3 file=${1?' empty input file'}
      4 trap "rm -f a.out; exit" 0 1 2 3 15
      5 ulimit -c 0
      6 rm -f test.log
      7 
      8 SYS=`uname | tr A-Z a-z`
      9 FORMAT=elf
     10 ABI=sysv
     11 ARCH=amd64
     12 
     13 export SYS FORMAT ABI ARCH
     14 
     15 while read i state
     16 do
     17 	echo $i >>test.log
     18 	state=${state:-"\t"}
     19 	rm -f a.out
     20 
     21 	(scc -Isysinclude $CFLAGS "$i" && ./a.out) 2>>test.log &&
     22 		printf '[PASS]' || printf '[FAIL]'
     23 	printf '%s\t%s\n' "$state" "$i"
     24 done < $file