X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=test%2Fwscript;h=f669c3784ef77142d3afc3e3c0af555fe67c8367;hb=35d8cf6d0e45cb5fff078dd984b492b3c83fa4ee;hp=d22875e91ad8852d4e500b08a9e520d82d148f0c;hpb=ed6a471b61d36a3ba7e8696fa3e5606406c5cf62;p=libdcp.git diff --git a/test/wscript b/test/wscript index d22875e9..f669c378 100644 --- a/test/wscript +++ b/test/wscript @@ -4,38 +4,81 @@ def configure(conf): else: boost_lib_suffix = '' - conf.check_cxx(fragment = """ - #define BOOST_TEST_MODULE Config test\n - #include \n - int main() {} - """, - msg = 'Checking for boost unit testing library', - lib = 'boost_unit_test_framework%s' % boost_lib_suffix, - uselib_store = 'BOOST_TEST') + conf.check_cxx(fragment=""" + #define BOOST_TEST_MODULE Config test\n + #include \n + int main() {} + """, + msg='Checking for boost unit testing library', + lib='boost_unit_test_framework%s' % boost_lib_suffix, + uselib_store='BOOST_TEST') conf.env.prepend_value('LINKFLAGS', '-Lsrc') def build(bld): - obj = bld(features = 'cxx cxxprogram') + obj = bld(features='cxx cxxprogram') obj.name = 'tests' - obj.uselib = 'BOOST_TEST OPENJPEG XMLSEC1' - obj.use = 'libdcp' - obj.source = 'tests.cc' + obj.uselib = 'BOOST_TEST OPENJPEG CXML XMLSEC1 SNDFILE' + if bld.env.HAVE_GCOV: + obj.use = 'libdcp%s_gcov' % bld.env.API_VERSION + obj.lib = ['gcov'] + else: + obj.use = 'libdcp%s' % bld.env.API_VERSION + obj.source = """ + argb_frame_test.cc + certificates_test.cc + colour_test.cc + colour_conversion_test.cc + cpl_sar_test.cc + dcp_test.cc + dcp_time_test.cc + decryption_test.cc + effect_test.cc + encryption_test.cc + exception_test.cc + fraction_test.cc + frame_info_test.cc + image_test.cc + interop_load_font_test.cc + local_time_test.cc + kdm_test.cc + read_dcp_test.cc + recovery_test.cc + rgb_xyz_test.cc + round_trip_test.cc + smpte_load_font_test.cc + smpte_subtitle_test.cc + subtitle_test.cc + test.cc + text_test.cc + util_test.cc + """ obj.target = 'tests' obj.install_path = '' + obj.cppflags = ['-fprofile-arcs', '-ftest-coverage', '-fno-inline', '-fno-default-inline', '-fno-elide-constructors', '-g', '-O0'] - obj = bld(features = 'cxx cxxprogram') + obj = bld(features='cxx cxxprogram') obj.name = 'subs_in_out' - obj.uselib = 'BOOST_TEST OPENJPEG' - obj.use = 'libdcp' + obj.uselib = 'BOOST_TEST OPENJPEG CXML' + if bld.env.HAVE_GCOV: + obj.use = 'libdcp%s_gcov' % bld.env.API_VERSION + obj.lib = ['gcov'] + else: + obj.use = 'libdcp%s' % bld.env.API_VERSION obj.source = 'subs_in_out.cc' obj.target = 'subs_in_out' obj.install_path = '' + obj.cppflags = ['-fprofile-arcs', '-ftest-coverage', '-fno-inline', '-fno-default-inline', '-fno-elide-constructors', '-g', '-O0'] - obj = bld(features = 'cxx cxxprogram') + obj = bld(features='cxx cxxprogram') obj.name = 'rewrite_subs' - obj.uselib = 'BOOST_TEST OPENJPEG' - obj.use = 'libdcp' + obj.uselib = 'BOOST_TEST OPENJPEG CXML' + if bld.env.HAVE_GCOV: + obj.use = 'libdcp%s_gcov' % bld.env.API_VERSION + obj.lib = ['gcov'] + else: + obj.use = 'libdcp%s' % bld.env.API_VERSION obj.source = 'rewrite_subs.cc' obj.target = 'rewrite_subs' obj.install_path = '' + obj.cppflags = ['-fprofile-arcs', '-ftest-coverage', '-fno-inline', '-fno-default-inline', '-fno-elide-constructors', '-g', '-O0']