blob: a3d8041c25704e46744860c36351f52d4935da4d [file] [log] [blame]
Josh Coalsona86f8702002-08-20 04:03:24 +00001#!/bin/sh
2
3# FLAC - Free Lossless Audio Codec
Josh Coalson0395dac2006-04-25 06:59:33 +00004# Copyright (C) 2002,2003,2004,2005,2006 Josh Coalson
Josh Coalsona86f8702002-08-20 04:03:24 +00005#
Josh Coalsone8a76012003-02-07 00:14:32 +00006# This file is part the FLAC project. FLAC is comprised of several
7# components distributed under difference licenses. The codec libraries
8# are distributed under Xiph.Org's BSD-like license (see the file
9# COPYING.Xiph in this distribution). All other programs, libraries, and
10# plugins are distributed under the GPL (see COPYING.GPL). The documentation
11# is distributed under the Gnu FDL (see COPYING.FDL). Each file in the
12# FLAC distribution contains at the top the terms under which it may be
13# distributed.
Josh Coalsona86f8702002-08-20 04:03:24 +000014#
Josh Coalsone8a76012003-02-07 00:14:32 +000015# Since this particular file is relevant to all components of FLAC,
16# it may be distributed under the Xiph.Org license, which is the least
17# restrictive of those mentioned above. See the file COPYING.Xiph in this
18# distribution.
Josh Coalsona86f8702002-08-20 04:03:24 +000019
Josh Coalson6218b342002-12-12 03:58:18 +000020die ()
21{
22 echo $* 1>&2
23 exit 1
24}
25
Josh Coalsonb43d3cb2004-11-09 01:28:05 +000026if [ x = x"$1" ] ; then
27 BUILD=debug
28else
29 BUILD="$1"
30fi
31
32LD_LIBRARY_PATH=../src/libFLAC/.libs:$LD_LIBRARY_PATH
33LD_LIBRARY_PATH=../src/libOggFLAC/.libs:$LD_LIBRARY_PATH
34LD_LIBRARY_PATH=../src/libOggFLAC++/.libs:$LD_LIBRARY_PATH
35LD_LIBRARY_PATH=../src/share/grabbag/.libs:$LD_LIBRARY_PATH
36LD_LIBRARY_PATH=../src/share/replaygain_analysis/.libs:$LD_LIBRARY_PATH
37LD_LIBRARY_PATH=../obj/$BUILD/lib:$LD_LIBRARY_PATH
Josh Coalsona86f8702002-08-20 04:03:24 +000038export LD_LIBRARY_PATH
Josh Coalsonb43d3cb2004-11-09 01:28:05 +000039PATH=../src/test_libOggFLAC++:$PATH
40PATH=../obj/$BUILD/bin:$PATH
Josh Coalsona86f8702002-08-20 04:03:24 +000041
Josh Coalson34c1ea82002-12-04 04:57:33 +000042run_test_libOggFLACpp ()
43{
Josh Coalsonde9091e2006-05-25 02:48:22 +000044 if [ x"$FLAC__TEST_WITH_VALGRIND" = xyes ] ; then
Josh Coalson80936c52002-12-30 23:31:47 +000045 valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 test_libOggFLAC++ $* 4>>test_libOggFLAC++.valgrind.log
Josh Coalson34c1ea82002-12-04 04:57:33 +000046 else
47 test_libOggFLAC++ $*
48 fi
49}
50
Josh Coalson6218b342002-12-12 03:58:18 +000051run_test_libOggFLACpp || die "ERROR during test_libOggFLAC++"