aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.7/contrib/reghunt/examples/29106.test
blob: 28f89a8e540ca833674a92c8595ca5c335a86cc5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#! /bin/sh

ID=$1

LOGID=`printf "%04d" ${ID}`
LOG=${BUGID}.${LOGID}.out
MSGID="bug ${BUGID}, id ${ID}"

$REG_TEST_COMPILER $REG_OPTS $REG_TESTCASE > ${LOG} 2>&1

if [ $? -ne 0 ]; then
    echo "`date`  unexpected failure: test compilation failed for ${MSGID}"
    exit $REG_ERROR
fi

./a.out >> ${LOG} 2>&1
if [ $? -ne 0 ]; then
    echo "`date`  unexpected failure: test run aborted for ${MSGID}"
    exit $REG_ERROR
fi

grep -q 'size of thingy is 4' $LOG
if [ $? -ne 0 ]; then
    echo "`date`  no output for ${MSGID}"
    exit $REG_FAIL
fi

echo "`date`  test ran successfully for ${MSGID}"
exit $REG_PASS