Fixes setting test level and valgrind testing
[platform/upstream/flac.git] / test / Makefile.am
1 #  FLAC - Free Lossless Audio Codec
2 #  Copyright (C) 2001,2002,2003,2004,2005,2006,2007,2008,2009  Josh Coalson
3 #
4 #  This file is part the FLAC project.  FLAC is comprised of several
5 #  components distributed under difference licenses.  The codec libraries
6 #  are distributed under Xiph.Org's BSD-like license (see the file
7 #  COPYING.Xiph in this distribution).  All other programs, libraries, and
8 #  plugins are distributed under the GPL (see COPYING.GPL).  The documentation
9 #  is distributed under the Gnu FDL (see COPYING.FDL).  Each file in the
10 #  FLAC distribution contains at the top the terms under which it may be
11 #  distributed.
12 #
13 #  Since this particular file is relevant to all components of FLAC,
14 #  it may be distributed under the Xiph.Org license, which is the least
15 #  restrictive of those mentioned above.  See the file COPYING.Xiph in this
16 #  distribution.
17
18 TESTS_ENVIRONMENT = FLAC__TEST_LEVEL=@FLAC__TEST_LEVEL@ FLAC__TEST_WITH_VALGRIND=@FLAC__TEST_WITH_VALGRIND@
19
20 SUBDIRS = cuesheets flac-to-flac-metadata-test-files metaflac-test-files pictures
21
22 check_SCRIPTS = \
23         test_libFLAC.sh \
24         test_libFLAC++.sh \
25         test_grabbag.sh \
26         test_flac.sh \
27         test_metaflac.sh \
28         test_seeking.sh \
29         test_streams.sh \
30         test_compression.sh
31
32 # This one should pass when building out-of-tree (eg 'make distcheck').
33 check: $(check_SCRIPTS)
34         $(TESTS_ENVIRONMENT) $(srcdir)/test_libFLAC.sh
35 if FLaC__WITH_CPPLIBS
36         $(TESTS_ENVIRONMENT) $(srcdir)/test_libFLAC++.sh
37 endif
38         $(TESTS_ENVIRONMENT) $(srcdir)/test_seeking.sh
39         $(TESTS_ENVIRONMENT) $(srcdir)/test_streams.sh
40         $(TESTS_ENVIRONMENT) $(srcdir)/test_compression.sh
41         @echo "----------------"
42         @echo "All tests passed"
43         @echo "----------------"
44
45 # This is the full test suite, but only works correctly in-tree.
46 # In particular test_grabbag.sh, test_flac.sh and test_metaflac.sh will not
47 # run correctly out-of-tree.
48 fullcheck: $(check_SCRIPTS)
49         $(TESTS_ENVIRONMENT) ./test_libFLAC.sh
50 if FLaC__WITH_CPPLIBS
51         $(TESTS_ENVIRONMENT) ./test_libFLAC++.sh
52 endif
53         $(TESTS_ENVIRONMENT) ./test_grabbag.sh
54         $(TESTS_ENVIRONMENT) ./test_flac.sh
55         $(TESTS_ENVIRONMENT) ./test_metaflac.sh
56         $(TESTS_ENVIRONMENT) ./test_seeking.sh
57         $(TESTS_ENVIRONMENT) ./test_streams.sh
58         $(TESTS_ENVIRONMENT) ./test_compression.sh
59         @echo "----------------"
60         @echo "All tests passed"
61         @echo "----------------"
62
63 EXTRA_DIST = \
64         Makefile.lite \
65         cuesheet.ok \
66         metaflac.flac.in \
67         metaflac.flac.ok \
68         picture.ok \
69         $(check_SCRIPTS) \
70         test_wrapper.sh \
71         test_bins.sh \
72         write_iff.pl
73
74 clean-local:
75         -rm -f *.raw *.flac *.oga *.ogg *.cmp *.aiff *.wav *.w64 *.rf64 *.diff *.log *.cue core