xref: /aosp_15_r20/external/flac/test/test_libFLAC++.sh (revision 600f14f40d737144c998e2ec7a483122d3776fbc)
1*600f14f4SXin Li#!/bin/sh -e
2*600f14f4SXin Li
3*600f14f4SXin Li#  FLAC - Free Lossless Audio Codec
4*600f14f4SXin Li#  Copyright (C) 2002-2009  Josh Coalson
5*600f14f4SXin Li#  Copyright (C) 2011-2023  Xiph.Org Foundation
6*600f14f4SXin Li#
7*600f14f4SXin Li#  This file is part the FLAC project.  FLAC is comprised of several
8*600f14f4SXin Li#  components distributed under different licenses.  The codec libraries
9*600f14f4SXin Li#  are distributed under Xiph.Org's BSD-like license (see the file
10*600f14f4SXin Li#  COPYING.Xiph in this distribution).  All other programs, libraries, and
11*600f14f4SXin Li#  plugins are distributed under the GPL (see COPYING.GPL).  The documentation
12*600f14f4SXin Li#  is distributed under the Gnu FDL (see COPYING.FDL).  Each file in the
13*600f14f4SXin Li#  FLAC distribution contains at the top the terms under which it may be
14*600f14f4SXin Li#  distributed.
15*600f14f4SXin Li#
16*600f14f4SXin Li#  Since this particular file is relevant to all components of FLAC,
17*600f14f4SXin Li#  it may be distributed under the Xiph.Org license, which is the least
18*600f14f4SXin Li#  restrictive of those mentioned above.  See the file COPYING.Xiph in this
19*600f14f4SXin Li#  distribution.
20*600f14f4SXin Li
21*600f14f4SXin Li. ./common.sh
22*600f14f4SXin Li
23*600f14f4SXin LiPATH=../src/test_libFLAC++:$PATH
24*600f14f4SXin LiPATH=../objs/$BUILD/bin:$PATH
25*600f14f4SXin Li
26*600f14f4SXin Lirun_test_libFLACpp ()
27*600f14f4SXin Li{
28*600f14f4SXin Li	if [ "$FLAC__TEST_WITH_VALGRIND" = yes ] ; then
29*600f14f4SXin Li		valgrind --leak-check=yes --show-reachable=yes --num-callers=50 --log-fd=4 test_libFLAC++${EXE} $* 4>>test_libFLAC++.valgrind.log
30*600f14f4SXin Li	else
31*600f14f4SXin Li		test_libFLAC++${EXE} $*
32*600f14f4SXin Li	fi
33*600f14f4SXin Li}
34*600f14f4SXin Li
35*600f14f4SXin Lirun_test_libFLACpp "$@" || die "ERROR during test_libFLAC++"
36