2 # Copyright (C) 2012-2016 Carl Hetherington <cth@carlh.net>
4 # This file is part of DCP-o-matic.
6 # DCP-o-matic is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
11 # DCP-o-matic is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>.
22 if conf.env.TARGET_WINDOWS:
23 boost_test_suffix='-mt'
25 conf.check_cfg(package='sndfile', args='--cflags --libs', uselib_store='SNDFILE', mandatory=True)
27 conf.check_cxx(fragment="""
28 #define BOOST_TEST_MODULE Config test\n
29 #include <boost/test/unit_test.hpp>\n
31 """, msg = 'Checking for boost unit testing library', lib = 'boost_unit_test_framework%s' % boost_test_suffix, uselib_store = 'BOOST_TEST')
34 obj = bld(features='cxx cxxprogram')
35 obj.name = 'unit-tests'
36 obj.uselib = 'BOOST_TEST BOOST_THREAD BOOST_FILESYSTEM BOOST_DATETIME SNDFILE SAMPLERATE DCP FONTCONFIG CAIROMM PANGOMM XMLPP '
37 obj.uselib += 'AVFORMAT AVFILTER AVCODEC AVUTIL SWSCALE SWRESAMPLE POSTPROC CXML SUB GLIB CURL SSH XMLSEC BOOST_REGEX ICU NETTLE PNG '
38 obj.uselib += 'LEQM_NRT ZIP '
39 if bld.env.TARGET_WINDOWS:
40 obj.uselib += 'WINSOCK2 DBGHELP SHLWAPI MSWSOCK BOOST_LOCALE '
41 if bld.env.TARGET_LINUX:
43 obj.use = 'libdcpomatic2'
47 audio_analysis_test.cc
53 audio_processor_test.cc
54 audio_processor_delay_test.cc
55 audio_ring_buffers_test.cc
57 cinema_sound_processor_test.cc
59 closed_caption_test.cc
60 colour_conversion_test.cc
66 dcpomatic_time_test.cc
72 ffmpeg_audio_only_test.cc
75 ffmpeg_decoder_seek_test.cc
76 ffmpeg_decoder_sequential_test.cc
77 ffmpeg_encoder_test.cc
78 ffmpeg_examiner_test.cc
79 ffmpeg_pts_offset_test.cc
84 frame_interval_checker_test.cc
87 image_content_fade_test.cc
88 image_filename_sorter_test.cc
92 interrupt_encoder_test.cc
99 optimise_stills_test.cc
100 pixel_formats_test.cc
102 pulldown_detect_test.cc
109 required_disk_space_test.cc
111 remake_with_subtitle_test.cc
112 render_subtitles_test.cc
114 silence_padding_test.cc
121 subtitle_charset_test.cc
122 subtitle_language_test.cc
123 subtitle_metadata_test.cc
124 subtitle_reel_test.cc
125 subtitle_reel_number_test.cc
126 subtitle_trim_test.cc
129 time_calculation_test.cc
131 update_checker_test.cc
135 video_content_scale_test.cc
137 video_mxf_content_test.cc
142 if bld.env.TARGET_LINUX and bld.env.ENABLE_DISK:
143 obj.source += " disk_writer_test.cc"
144 obj.uselib += "LWEXT4 NANOMSG "
146 # Some difference in font rendering between the test machine and others...
147 # burnt_subtitle_test.cc
148 # This one doesn't check anything
151 obj.target = 'unit-tests'
152 obj.install_path = ''