~ubuntu-branches/ubuntu/karmic/flac/karmic

« back to all changes in this revision

Viewing changes to test/test_bins.sh

  • Committer: Bazaar Package Importer
  • Author(s): Marc 'HE' Brockschmidt
  • Date: 2008-03-16 18:02:56 UTC
  • mfrom: (1.1.5 upstream) (10 gutsy)
  • mto: This revision was merged to the branch mainline in revision 14.
  • Revision ID: james.westby@ubuntu.com-20080316180256-qhf3wk704rp165pm
* Non-maintainer upload.
* Fix gcc-4.3 FTBFS, patch by KiBi (Closes: #455304)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/bin/sh
2
2
 
3
3
#  FLAC - Free Lossless Audio Codec
4
 
#  Copyright (C) 2001,2002,2003,2004,2005  Josh Coalson
 
4
#  Copyright (C) 2001,2002,2003,2004,2005,2006,2007  Josh Coalson
5
5
#
6
6
#  This file is part the FLAC project.  FLAC is comprised of several
7
7
#  components distributed under difference licenses.  The codec libraries
30
30
fi
31
31
 
32
32
LD_LIBRARY_PATH=../src/libFLAC/.libs:$LD_LIBRARY_PATH
33
 
LD_LIBRARY_PATH=../src/libOggFLAC/.libs:$LD_LIBRARY_PATH
34
33
LD_LIBRARY_PATH=../src/share/grabbag/.libs:$LD_LIBRARY_PATH
35
34
LD_LIBRARY_PATH=../src/share/getopt/.libs:$LD_LIBRARY_PATH
36
35
LD_LIBRARY_PATH=../src/share/replaygain_analysis/.libs:$LD_LIBRARY_PATH
42
41
PATH=../obj/$BUILD/bin:$PATH
43
42
BINS_PATH=../../test_files/bins
44
43
 
 
44
if [ x"$FLAC__TEST_LEVEL" = x ] ; then
 
45
        FLAC__TEST_LEVEL=1
 
46
fi
 
47
 
45
48
flac --help 1>/dev/null 2>/dev/null || die "ERROR can't find flac executable"
46
49
 
47
50
run_flac ()
48
51
{
49
 
        if [ x"$FLAC__VALGRIND" = xyes ] ; then
50
 
                valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 flac $* 4>>test_bins.valgrind.log
 
52
        if [ x"$FLAC__TEST_WITH_VALGRIND" = xyes ] ; then
 
53
                echo "valgrind --leak-check=yes --show-reachable=yes --num-callers=100 flac $*" >>test_bins.valgrind.log
 
54
                valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --log-fd=4 flac $* 4>>test_bins.valgrind.log
51
55
        else
52
56
                flac $*
53
57
        fi
63
67
        encode_options="$4"
64
68
 
65
69
        echo -n "$name.bin (--channels=$channels --bps=$bps $encode_options): encode..."
66
 
        cmd="run_flac --verify --silent --force --force-raw-format --endian=big --sign=signed --sample-rate=44100 --bps=$bps --channels=$channels $encode_options $name.bin"
 
70
        cmd="run_flac --verify --silent --force --force-raw-format --endian=big --sign=signed --sample-rate=44100 --bps=$bps --channels=$channels $encode_options --no-padding $name.bin"
67
71
        echo "### ENCODE $name #######################################################" >> ./streams.log
68
72
        echo "###    cmd=$cmd" >> ./streams.log
69
73
        $cmd 2>>./streams.log || die "ERROR during encode of $name"
98
102
                                                        done
99
103
                                                done
100
104
                                        done
101
 
                                        if [ "$FLAC__EXHAUSTIVE_TESTS" = yes ] ; then
102
 
                                                test_file $binfile $channels $bps "-b 16384 -m -r 8 -l 32 -e -p $disable"
 
105
                                        if [ "$FLAC__TEST_LEVEL" -gt 1 ] ; then
 
106
                                                test_file $binfile $channels $bps "--lax -b 16384 -m -r 8 -l 32 -e -p $disable"
103
107
                                        fi
104
108
                                done
105
109
                        done