blob: 25708c0fb85196c3d6cffc1a21e42294bccf22a0 [file] [log] [blame]
Alexander Afanasyev4ffcff22014-09-02 15:39:20 -07001# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
2
Shock Jiang3c723182014-09-10 16:41:18 -07003from waflib import Utils, Context
Alexander Afanasyev4ffcff22014-09-02 15:39:20 -07004
5top = '..'
6
7def build(bld):
Shock Jiang0b165f42014-10-24 09:08:09 -07008 if not bld.env['WITH_TESTS']:
9 return
10 dst = bld.bldnode.make_node("conf-test/anchors")
11 dst.mkdir()
12
Alexander Afanasyev7495a7e2014-11-20 19:21:27 -080013 bld(features="subst",
14 name='test-validator-conf',
15 source='../validator.conf.sample.in',
16 target='../conf-test/validator.conf',
17 use='validator-sample',
Shock Jiang0b165f42014-10-24 09:08:09 -070018 ANCHORPATH='\"anchors/root.cert\"',
19 RELATION='is-prefix-of',
20 )
21
Alexander Afanasyev7495a7e2014-11-20 19:21:27 -080022 bld(features="subst",
23 name='test-logger-conf',
24 source='../log4cxx.properties.sample.in',
25 target='../conf-test/log4cxx.properties.sample',
26 is_copy=True,
27 use='log4cxx-sample',
Shock Jiang0b165f42014-10-24 09:08:09 -070028 )
29
Alexander Afanasyev7495a7e2014-11-20 19:21:27 -080030 bld(features='cxx',
31 name='unit-tests-main',
32 target='unit-tests-main',
33 source='main.cpp',
34 defines=['BOOST_TEST_MODULE=NDNS Unit Tests'],
35 use='ndns-objects BOOST')
36
Shock Jiang0b165f42014-10-24 09:08:09 -070037 unit_tests = bld.program(
38 target='../unit-tests',
39 features='cxx cxxprogram',
Alexander Afanasyev7495a7e2014-11-20 19:21:27 -080040 source=bld.path.ant_glob(['**/*.cpp'], excl=['main.cpp']),
41 use='ndns-objects unit-tests-main BOOST',
Shock Jiang0b165f42014-10-24 09:08:09 -070042 install_path=None,
43 defines='TEST_CONFIG_PATH=\"%s/conf-test\"' %(bld.bldnode)
44 )