OSDN Git Service

* examples: New directory.
[pf3gnuchains/gcc-fork.git] / contrib / reghunt / examples / 29106.test
1 #! /bin/sh
2
3 ID=$1
4
5 LOGID=`printf "%04d" ${ID}`
6 LOG=${BUGID}.${LOGID}.out
7 MSGID="bug ${BUGID}, id ${ID}"
8
9 $REG_TEST_COMPILER $REG_OPTS $REG_TESTCASE > ${LOG} 2>&1
10
11 if [ $? -ne 0 ]; then
12     echo "`date`  unexpected failure: test compilation failed for ${MSGID}"
13     exit $REG_ERROR
14 fi
15
16 ./a.out >> ${LOG} 2>&1
17 if [ $? -ne 0 ]; then
18     echo "`date`  unexpected failure: test run aborted for ${MSGID}"
19     exit $REG_ERROR
20 fi
21
22 grep -q 'size of thingy is 4' $LOG
23 if [ $? -ne 0 ]; then
24     echo "`date`  no output for ${MSGID}"
25     exit $REG_FAIL
26 fi
27
28 echo "`date`  test ran successfully for ${MSGID}"
29 exit $REG_PASS