• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/sh
2
3#
4# checkout lame
5# run python scripts
6# mail output
7#
8
9CVS_RSH=/home/mt/bin/sshcvs
10LAME_DIR=/home/mt/mp3/lame_cvscheck
11TESTCASE=/home/mt/mp3/test/castanets.wav
12export OUTPUT=/tmp/cvscheck.out
13export TO="lame-cvs@lists.sourceforge.net"
14
15cd ${LAME_DIR}
16#cvs -z3 -dmarkt@cvs.lame.sourceforge.net:/cvsroot/lame co -d lame_cvscheck lame
17cvs update -P -d
18if [ $? != 0 ]; then
19    echo "Error running CVS update. cvscheck script exiting."
20    exit 1
21fi
22
23if [ -f ${OUTPUT} ]; then
24    mv -f ${OUTPUT} ${OUTPUT}.old
25fi
26rm -f frontend/lame
27rm -f config.cache
28./configure --enable-debug
29make clean
30make
31
32if [ $? != 0 ]; then
33    echo "Error compiling code..." > ${OUTPUT}
34else
35    test/lametest.py test/CBRABR.op ${TESTCASE} frontend/lame > ${OUTPUT}
36fi
37
38# check if there are failed tests
39if grep >/dev/null 2>&1 "Number of tests which failed:  0" ${OUTPUT} ; then
40    echo "No failed tests."
41else
42    # yes, failed tests, send output
43
44    if diff >/dev/null 2>&1 -bBiq ${OUTPUT}.old ${OUTPUT} ; then
45        export MSG='No change since last failed test(s).'
46    else
47        export MSG='Another change since last failed test(s)!'
48        cat ${OUTPUT}; echo "${MSG}"
49    fi
50
51    ( cat ${OUTPUT}; echo "${MSG}" ) | mail -s "Automated lame test" ${TO}
52fi
53
54