summaryrefslogtreecommitdiff
path: root/test/wscript
blob: 23469203ba886cb46867f2c9e01ca1dd156d97f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
def configure(conf):
    if conf.options.target_windows:
        boost_lib_suffix = '-mt'
    else:
        boost_lib_suffix = ''

    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_lib_suffix,
                              uselib_store = 'BOOST_TEST')

    conf.env.prepend_value('LINKFLAGS', '-Lsrc')

def build(bld):
    obj = bld(features = 'cxx cxxprogram')
    obj.name   = 'tests'
    obj.uselib = 'BOOST_TEST OPENJPEG CXML XMLSEC1'
    obj.use    = 'libdcp'
    obj.source = """
                 certificates_test.cc
                 color_test.cc
                 dcp_test.cc
                 dcp_time_test.cc
                 decryption_test.cc
                 encryption_test.cc
                 error_test.cc
                 frame_info_test.cc
                 kdm_key_test.cc
                 kdm_test.cc
                 lut_test.cc
                 read_dcp_test.cc
                 recovery_test.cc
                 round_trip_test.cc
                 subtitle_tests.cc
                 test.cc 
                 utc_offset_to_string_test.cc
                 util_test.cc
                 """
    obj.target = 'tests'
    obj.install_path = ''

    obj = bld(features = 'cxx cxxprogram')
    obj.name   = 'subs_in_out'
    obj.uselib = 'BOOST_TEST OPENJPEG CXML'
    obj.use    = 'libdcp'
    obj.source = 'subs_in_out.cc'
    obj.target = 'subs_in_out'
    obj.install_path = ''

    obj = bld(features = 'cxx cxxprogram')
    obj.name   = 'rewrite_subs'
    obj.uselib = 'BOOST_TEST OPENJPEG CXML'
    obj.use    = 'libdcp'
    obj.source = 'rewrite_subs.cc'
    obj.target = 'rewrite_subs'
    obj.install_path = ''