+#
+# Copyright (C) 2012-2016 Carl Hetherington <cth@carlh.net>
+#
+# This file is part of DCP-o-matic.
+#
+# DCP-o-matic is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# DCP-o-matic is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>.
+#
+
def configure(conf):
boost_test_suffix=''
- if conf.env.TARGET_WINDOWS:
- boost_test_suffix='-mt'
+ if conf.env.TARGET_WINDOWS_64:
+ boost_test_suffix='-mt-x64'
+ elif conf.env.TARGET_WINDOWS_32:
+ boost_test_suffix='-mt-x32'
+
+ conf.check_cfg(package='sndfile', args='--cflags --libs', uselib_store='SNDFILE', mandatory=True)
- conf.check_cxx(fragment = """
- #define BOOST_TEST_MODULE Config test\n
- #include <boost/test/unit_test.hpp>\n
- int main() {}
- """, msg = 'Checking for boost unit testing library', lib = 'boost_unit_test_framework%s' % boost_test_suffix, uselib_store = 'BOOST_TEST')
+ conf.check_cxx(fragment="""
+ #define BOOST_TEST_MODULE Config test\n
+ #include <boost/test/unit_test.hpp>\n
+ int main() {}
+ """, msg = 'Checking for boost unit testing library', lib = 'boost_unit_test_framework%s' % boost_test_suffix, uselib_store = 'BOOST_TEST')
def build(bld):
obj = bld(features='cxx cxxprogram')
obj.name = 'unit-tests'
- obj.uselib = 'BOOST_TEST BOOST_THREAD DCP OPENJPEG AVFORMAT AVFILTER AVCODEC AVUTIL SWSCALE POSTPROC CXML'
- obj.use = 'libdcpomatic'
+ obj.uselib = 'BOOST_TEST BOOST_THREAD BOOST_FILESYSTEM BOOST_DATETIME SNDFILE SAMPLERATE DCP FONTCONFIG CAIROMM PANGOMM XMLPP '
+ obj.uselib += 'AVFORMAT AVFILTER AVCODEC AVUTIL SWSCALE SWRESAMPLE POSTPROC CXML SUB GLIB CURL SSH XMLSEC BOOST_REGEX ICU NETTLE PNG '
+ obj.uselib += 'LEQM_NRT ZIP '
+ if bld.env.TARGET_WINDOWS_64 or bld.env.TARGET_WINDOWS_32:
+ obj.uselib += 'WINSOCK2 DBGHELP SHLWAPI MSWSOCK BOOST_LOCALE '
+ if bld.env.TARGET_LINUX:
+ obj.uselib += 'DL '
+ obj.use = 'libdcpomatic2'
obj.source = """
4k_test.cc
+ atmos_test.cc
audio_analysis_test.cc
audio_buffers_test.cc
audio_delay_test.cc
- audio_decoder_test.cc
+ audio_filter_test.cc
audio_mapping_test.cc
- black_fill_test.cc
+ audio_merger_test.cc
+ audio_processor_test.cc
+ audio_processor_delay_test.cc
+ audio_ring_buffers_test.cc
+ butler_test.cc
+ cinema_sound_processor_test.cc
client_server_test.cc
+ closed_caption_test.cc
colour_conversion_test.cc
+ config_test.cc
+ content_test.cc
+ cpl_hash_test.cc
+ create_cli_test.cc
+ crypto_test.cc
+ dcpomatic_time_test.cc
+ dcp_decoder_test.cc
+ dcp_metadata_test.cc
+ dcp_playback_test.cc
+ dcp_subtitle_test.cc
+ digest_test.cc
+ empty_caption_test.cc
+ empty_test.cc
+ encryption_test.cc
+ ffmpeg_audio_only_test.cc
ffmpeg_audio_test.cc
ffmpeg_dcp_test.cc
+ ffmpeg_decoder_error_test.cc
ffmpeg_decoder_seek_test.cc
ffmpeg_decoder_sequential_test.cc
+ ffmpeg_encoder_test.cc
ffmpeg_examiner_test.cc
ffmpeg_pts_offset_test.cc
file_group_test.cc
+ file_log_test.cc
+ file_naming_test.cc
film_metadata_test.cc
+ frame_interval_checker_test.cc
frame_rate_test.cc
+ hints_test.cc
+ image_content_fade_test.cc
+ image_filename_sorter_test.cc
image_test.cc
- job_test.cc
- make_black_test.cc
- player_test.cc
+ image_proxy_test.cc
+ import_dcp_test.cc
+ interrupt_encoder_test.cc
+ isdcf_name_test.cc
+ j2k_bandwidth_test.cc
+ job_manager_test.cc
+ kdm_cli_test.cc
+ kdm_naming_test.cc
+ low_bitrate_test.cc
+ markers_test.cc
+ no_use_video_test.cc
+ optimise_stills_test.cc
+ overlap_video_test.cc
pixel_formats_test.cc
+ player_test.cc
+ pulldown_detect_test.cc
ratio_test.cc
repeat_frame_test.cc
recover_test.cc
- resampler_test.cc
+ rect_test.cc
+ reels_test.cc
+ reel_writer_test.cc
+ required_disk_space_test.cc
+ remake_id_test.cc
+ remake_with_subtitle_test.cc
+ render_subtitles_test.cc
scaling_test.cc
- seek_zero_test.cc
silence_padding_test.cc
+ shuffler_test.cc
skip_frame_test.cc
+ socket_test.cc
+ srt_subtitle_test.cc
+ ssa_subtitle_test.cc
stream_test.cc
- subrip_test.cc
+ subtitle_charset_test.cc
+ subtitle_language_test.cc
+ subtitle_metadata_test.cc
+ subtitle_reel_test.cc
+ subtitle_reel_number_test.cc
+ subtitle_timing_test.cc
+ subtitle_trim_test.cc
test.cc
threed_test.cc
+ time_calculation_test.cc
+ torture_test.cc
+ update_checker_test.cc
+ upmixer_a_test.cc
util_test.cc
+ vf_test.cc
+ video_content_scale_test.cc
+ video_level_test.cc
+ video_mxf_content_test.cc
+ vf_kdm_test.cc
+ windows_test.cc
+ writer_test.cc
+ zipper_test.cc
"""
- obj.target = 'unit-tests'
- obj.install_path = ''
+ if bld.env.TARGET_LINUX and bld.env.ENABLE_DISK:
+ obj.source += " disk_writer_test.cc"
+ obj.uselib += "LWEXT4 NANOMSG "
- obj = bld(features='cxx cxxprogram')
- obj.name = 'long-unit-tests'
- obj.uselib = 'BOOST_TEST DCP OPENJPEG AVFORMAT AVFILTER AVCODEC AVUTIL SWSCALE POSTPROC CXML'
- obj.use = 'libdcpomatic'
- obj.source = """
- test.cc
- """
+ # Some difference in font rendering between the test machine and others...
+ # burnt_subtitle_test.cc
+ # This one doesn't check anything
+ # resampler_test.cc
- obj.target = 'long-unit-tests'
+ obj.target = 'unit-tests'
obj.install_path = ''