blob: 5a602d3fb466f5f574f26810bbd31bd0500c32f4 [file] [log] [blame]
Alexander Afanasyeva1ae0a12014-01-28 15:21:02 -08001# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
2
Alexander Afanasyev31ae15f2014-01-29 20:58:00 -08003from waflib import Utils
4
Alexander Afanasyeva1ae0a12014-01-28 15:21:02 -08005top = '..'
6
7def build(bld):
Alexander Afanasyev8b1674a2014-05-15 00:58:43 -07008 bld(features=['cxx', 'pch'],
9 name='tests-base',
10 target='tests-base',
11 headers=['../src/common-pch.hpp', 'boost-test.hpp'],
Alexander Afanasyev766cea72014-04-24 19:16:42 -070012 use='ndn-cxx',
Alexander Afanasyevb1db7c62014-04-03 14:57:25 -070013 includes='.',
Alexander Afanasyev8b1674a2014-05-15 00:58:43 -070014 )
15
16 unit_tests = bld(
17 target="unit-test-objects",
18 name="unit-test-objects",
19 features="cxx",
20 source=bld.path.ant_glob(['unit-tests/**/*.cpp'],
21 excl=['**/*-osx.cpp', '**/*-sqlite3.cpp']),
22 use='tests-base',
23 includes='.',
24 install_path=None,
25 )
26
27 integrated = bld(
28 target="integrated-test-objects",
29 name="integrated-test-objects",
30 features="cxx",
31 source=bld.path.ant_glob(['integrated/**/*.cpp'],
32 excl=['**/*-osx.cpp', '**/*-sqlite3.cpp']),
33 use='tests-base',
34 includes='.',
Alexander Afanasyev5e1288e2014-03-28 11:11:48 -070035 install_path=None,
Alexander Afanasyevd409d592014-01-28 18:36:38 -080036 )
Alexander Afanasyev31ae15f2014-01-29 20:58:00 -080037
Alexander Afanasyev59d67a52014-04-03 16:09:31 -070038 if bld.env['HAVE_OSX_SECURITY']:
Alexander Afanasyev8b1674a2014-05-15 00:58:43 -070039 unit_tests.source += bld.path.ant_glob('unit-tests/**/*-osx.cpp')
40 integrated.source += bld.path.ant_glob('integrated/**/*-osx.cpp')
Alexander Afanasyev31ae15f2014-01-29 20:58:00 -080041
42 # In case we want to make it optional later
Alexander Afanasyev8b1674a2014-05-15 00:58:43 -070043 unit_tests.source += bld.path.ant_glob('unit-tests/**/*-sqlite3.cpp')
44 integrated.source += bld.path.ant_glob('integrated/**/*-sqlite3.cpp')
Alexander Afanasyeve2dcdfd2014-02-07 15:53:28 -080045
Alexander Afanasyev8b1674a2014-05-15 00:58:43 -070046 unit_test_main = bld(
47 target='unit-tests-main',
48 name='unit-tests-main',
49 features='cxx',
50 source=bld.path.ant_glob(['*.cpp']),
51 use='ndn-cxx',
52 )
53
54 bld(features="cxx cxxprogram",
55 target="../unit-tests",
56 use="unit-test-objects unit-tests-main",
57 install_path=None)
58
59 bld(features="cxx cxxprogram",
60 target="../integrated-tests",
61 use="integrated-test-objects unit-tests-main",
62 install_path=None)