Add dcpomatic2_map tool (#2445).
[dcpomatic.git] / test / wscript
1 #
2 #    Copyright (C) 2012-2016 Carl Hetherington <cth@carlh.net>
3 #
4 #    This file is part of DCP-o-matic.
5 #
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.
10 #
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.
15 #
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/>.
18 #
19
20 def configure(conf):
21     boost_test_suffix=''
22     if conf.env.TARGET_WINDOWS_64:
23         boost_test_suffix='-mt-x64'
24     elif conf.env.TARGET_WINDOWS_32:
25         boost_test_suffix='-mt-x32'
26
27     conf.check_cfg(package='sndfile', args='--cflags --libs', uselib_store='SNDFILE', mandatory=True)
28
29     conf.check_cxx(fragment="""
30                             #define BOOST_TEST_MODULE Config test\n
31                             #include <boost/test/unit_test.hpp>\n
32                             int main() {}
33                             """, msg = 'Checking for boost unit testing library', lib = 'boost_unit_test_framework%s' % boost_test_suffix, uselib_store = 'BOOST_TEST')
34
35 def build(bld):
36     obj = bld(features='cxx cxxprogram')
37     obj.name   = 'unit-tests'
38     obj.uselib =  'BOOST_TEST BOOST_THREAD BOOST_FILESYSTEM BOOST_DATETIME SNDFILE SAMPLERATE DCP FONTCONFIG CAIROMM PANGOMM XMLPP '
39     obj.uselib += 'AVFORMAT AVFILTER AVCODEC AVUTIL SWSCALE SWRESAMPLE POSTPROC CXML SUB GLIB CURL SSH XMLSEC BOOST_REGEX ICU NETTLE PNG JPEG '
40     obj.uselib += 'LEQM_NRT ZIP '
41     if bld.env.TARGET_WINDOWS_64 or bld.env.TARGET_WINDOWS_32:
42         obj.uselib += 'WINSOCK2 DBGHELP SHLWAPI MSWSOCK BOOST_LOCALE '
43     if bld.env.TARGET_LINUX:
44         obj.uselib += 'DL '
45     obj.use    = 'libdcpomatic2'
46     obj.source = """
47                  4k_test.cc
48                  atmos_test.cc
49                  audio_analysis_test.cc
50                  audio_buffers_test.cc
51                  audio_content_test.cc
52                  audio_delay_test.cc
53                  audio_filter_test.cc
54                  audio_mapping_test.cc
55                  audio_merger_test.cc
56                  audio_processor_test.cc
57                  audio_processor_delay_test.cc
58                  audio_ring_buffers_test.cc
59                  butler_test.cc
60                  bv20_test.cc
61                  cinema_sound_processor_test.cc
62                  client_server_test.cc
63                  closed_caption_test.cc
64                  collator_test.cc
65                  colour_conversion_test.cc
66                  config_test.cc
67                  content_test.cc
68                  cpl_hash_test.cc
69                  create_cli_test.cc
70                  crypto_test.cc
71                  dcpomatic_time_test.cc
72                  dcp_decoder_test.cc
73                  dcp_digest_file_test.cc
74                  dcp_metadata_test.cc
75                  dcp_playback_test.cc
76                  dcp_subtitle_test.cc
77                  digest_test.cc
78                  empty_caption_test.cc
79                  empty_test.cc
80                  encryption_test.cc
81                  file_extension_test.cc
82                  ffmpeg_audio_only_test.cc
83                  ffmpeg_audio_test.cc
84                  ffmpeg_dcp_test.cc
85                  ffmpeg_decoder_error_test.cc
86                  ffmpeg_decoder_seek_test.cc
87                  ffmpeg_decoder_sequential_test.cc
88                  ffmpeg_encoder_test.cc
89                  ffmpeg_examiner_test.cc
90                  ffmpeg_properties_test.cc
91                  ffmpeg_pts_offset_test.cc
92                  file_group_test.cc
93                  file_log_test.cc
94                  file_naming_test.cc
95                  film_metadata_test.cc
96                  find_missing_test.cc
97                  font_comparator_test.cc
98                  frame_interval_checker_test.cc
99                  frame_rate_test.cc
100                  guess_crop_test.cc
101                  hints_test.cc
102                  image_content_fade_test.cc
103                  image_filename_sorter_test.cc
104                  image_test.cc
105                  image_proxy_test.cc
106                  import_dcp_test.cc
107                  interrupt_encoder_test.cc
108                  isdcf_name_test.cc
109                  j2k_bandwidth_test.cc
110                  job_manager_test.cc
111                  kdm_cli_test.cc
112                  kdm_naming_test.cc
113                  kdm_util_test.cc
114                  low_bitrate_test.cc
115                  markers_test.cc
116                  map_cli_test.cc
117                  mca_subdescriptors_test.cc
118                  no_use_video_test.cc
119                  optimise_stills_test.cc
120                  overlap_video_test.cc
121                  pixel_formats_test.cc
122                  player_test.cc
123                  pulldown_detect_test.cc
124                  ratio_test.cc
125                  release_notes_test.cc
126                  repeat_frame_test.cc
127                  recover_test.cc
128                  rect_test.cc
129                  reels_test.cc
130                  reel_writer_test.cc
131                  required_disk_space_test.cc
132                  remake_id_test.cc
133                  remake_with_subtitle_test.cc
134                  render_subtitles_test.cc
135                  scaling_test.cc
136                  scope_guard_test.cc
137                  scoped_temporary_test.cc
138                  silence_padding_test.cc
139                  shuffler_test.cc
140                  skip_frame_test.cc
141                  socket_test.cc
142                  srt_subtitle_test.cc
143                  ssa_subtitle_test.cc
144                  stream_test.cc
145                  subtitle_charset_test.cc
146                  subtitle_font_id_test.cc
147                  subtitle_font_id_change_test.cc
148                  subtitle_language_test.cc
149                  subtitle_metadata_test.cc
150                  subtitle_position_test.cc
151                  subtitle_reel_test.cc
152                  subtitle_reel_number_test.cc
153                  subtitle_timing_test.cc
154                  subtitle_trim_test.cc
155                  template_test.cc
156                  test.cc
157                  text_decoder_test.cc
158                  threed_test.cc
159                  time_calculation_test.cc
160                  torture_test.cc
161                  update_checker_test.cc
162                  upmixer_a_test.cc
163                  util_test.cc
164                  vf_test.cc
165                  video_content_scale_test.cc
166                  video_level_test.cc
167                  video_mxf_content_test.cc
168                  vf_kdm_test.cc
169                  writer_test.cc
170                  zipper_test.cc
171                  """
172
173     if bld.env.TARGET_LINUX and bld.env.ENABLE_DISK:
174         obj.source += " disk_writer_test.cc"
175         obj.uselib += "LWEXT4 NANOMSG "
176
177     # Some difference in font rendering between the test machine and others...
178     # burnt_subtitle_test.cc
179     # This one doesn't check anything
180     # resampler_test.cc
181
182     obj.target = 'unit-tests'
183     obj.install_path = ''