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
6
6
# This file is part the FLAC project. FLAC is comprised of several
7
7
# components distributed under difference licenses. The codec libraries
35
35
LD_LIBRARY_PATH=../obj/$BUILD/lib:$LD_LIBRARY_PATH
36
36
export LD_LIBRARY_PATH
37
37
PATH=../src/test_grabbag/cuesheet:$PATH
38
PATH=../src/test_grabbag/picture:$PATH
38
39
PATH=../obj/$BUILD/bin:$PATH
40
41
test_cuesheet -h 1>/dev/null 2>/dev/null || die "ERROR can't find test_cuesheet executable"
42
test_picture -h 1>/dev/null 2>/dev/null || die "ERROR can't find test_picture executable"
42
44
run_test_cuesheet ()
44
if [ x"$FLAC__VALGRIND" = xyes ] ; then
45
valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 test_cuesheet $* 4>>test_grabbag.valgrind.log
46
if [ x"$FLAC__TEST_WITH_VALGRIND" = xyes ] ; then
47
echo "valgrind --leak-check=yes --show-reachable=yes --num-callers=100 test_cuesheet $*" >>test_grabbag.valgrind.log
48
valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --log-fd=4 test_cuesheet $* 4>>test_grabbag.valgrind.log
56
if [ x"$FLAC__TEST_WITH_VALGRIND" = xyes ] ; then
57
echo "valgrind --leak-check=yes --show-reachable=yes --num-callers=100 test_picture $*" >>test_grabbag.valgrind.log
58
valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --log-fd=4 test_picture $* 4>>test_grabbag.valgrind.log
64
if [ `env | grep -ic '^comspec='` != 0 ] ; then
70
########################################################################
74
########################################################################
79
echo "Running test_picture..."
83
run_test_picture $picture_dir >> $log 2>&1
85
if [ $is_win = yes ] ; then
86
diff -w picture.ok $log > picture.diff || die "Error: .log file does not match .ok file, see picture.diff"
88
diff picture.ok $log > picture.diff || die "Error: .log file does not match .ok file, see picture.diff"
91
echo "PASSED (results are in $log)"
51
93
########################################################################
95
139
rm -f $cuesheet_pass1 $cuesheet_pass2
98
diff cuesheet.ok $log > cuesheet.diff || die "Error: .log file does not match .ok file, see cuesheet.diff"
142
if [ $is_win = yes ] ; then
143
diff -w cuesheet.ok $log > cuesheet.diff || die "Error: .log file does not match .ok file, see cuesheet.diff"
145
diff cuesheet.ok $log > cuesheet.diff || die "Error: .log file does not match .ok file, see cuesheet.diff"
100
148
echo "PASSED (results are in $log)"