1#!/bin/sh23file=${1?' empty input file'}4trap 'rm -f a.out; exit' EXIT HUP INT TERM5ulimit -c 06rm -f test.log78SYS=`uname | tr A-Z a-z`9FORMAT=elf10ABI=sysv11ARCH=amd641213export SYS FORMAT ABI ARCH1415while read i state16do17 echo $i >>test.log18 state=${state:-""}19 rm -f a.out2021 ((${MAKE-make} -s $i && ./$i) >>test.log 2>&1 &&22 printf '[PASS]' || printf '[FAIL]'23 printf '\t%s\t%s\n' $i $state) | tee -a test.log24done < $file