X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=test%2Fwscript;h=30015939418b5073020ff438103193cd0124d585;hb=6a804ace532c13b2095972cd48d422e2c9fa0b70;hp=c02502553f8a4f351c5dc3b2d8ec599e5ce9e4f1;hpb=e563727ee7b72881ee163db9b777559c8ceb5074;p=libdcp.git diff --git a/test/wscript b/test/wscript index c0250255..30015939 100644 --- a/test/wscript +++ b/test/wscript @@ -4,55 +4,79 @@ 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 CXML XMLSEC1' - obj.use = 'libdcp' + 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 = """ - test.cc certificates_test.cc + colour_test.cc + colour_conversion_test.cc + cpl_sar_test.cc dcp_test.cc - encryption_test.cc - lut_test.cc - read_dcp_test.cc - color_test.cc dcp_time_test.cc - error_test.cc - recovery_test.cc - utc_offset_to_string_test.cc decryption_test.cc + effect_test.cc + encryption_test.cc + exception_test.cc + fraction_test.cc + interop_load_font_test.cc + local_time_test.cc kdm_test.cc - subtitle_tests.cc - util_test.cc + read_dcp_test.cc + read_subtitle_test.cc + recovery_test.cc + rgb_xyz_test.cc round_trip_test.cc + smpte_load_font_test.cc + smpte_subtitle_test.cc + test.cc + text_test.cc + util_test.cc + write_subtitle_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 CXML' - obj.use = 'libdcp' + 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 CXML' - obj.use = 'libdcp' + 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']