Alexander Afanasyev | 4ffcff2 | 2014-09-02 15:39:20 -0700 | [diff] [blame] | 1 | # -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- |
| 2 | |
Shock Jiang | 3c72318 | 2014-09-10 16:41:18 -0700 | [diff] [blame] | 3 | from waflib import Utils, Context |
Alexander Afanasyev | 4ffcff2 | 2014-09-02 15:39:20 -0700 | [diff] [blame] | 4 | |
| 5 | top = '..' |
| 6 | |
| 7 | def build(bld): |
Shock Jiang | 0b165f4 | 2014-10-24 09:08:09 -0700 | [diff] [blame] | 8 | if not bld.env['WITH_TESTS']: |
| 9 | return |
| 10 | dst = bld.bldnode.make_node("conf-test/anchors") |
| 11 | dst.mkdir() |
| 12 | |
Alexander Afanasyev | 7495a7e | 2014-11-20 19:21:27 -0800 | [diff] [blame] | 13 | 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 Jiang | 0b165f4 | 2014-10-24 09:08:09 -0700 | [diff] [blame] | 18 | ANCHORPATH='\"anchors/root.cert\"', |
| 19 | RELATION='is-prefix-of', |
| 20 | ) |
| 21 | |
Alexander Afanasyev | 7495a7e | 2014-11-20 19:21:27 -0800 | [diff] [blame] | 22 | 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 Jiang | 0b165f4 | 2014-10-24 09:08:09 -0700 | [diff] [blame] | 28 | ) |
| 29 | |
Alexander Afanasyev | 7495a7e | 2014-11-20 19:21:27 -0800 | [diff] [blame] | 30 | 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 Jiang | 0b165f4 | 2014-10-24 09:08:09 -0700 | [diff] [blame] | 37 | unit_tests = bld.program( |
| 38 | target='../unit-tests', |
| 39 | features='cxx cxxprogram', |
Alexander Afanasyev | 7495a7e | 2014-11-20 19:21:27 -0800 | [diff] [blame] | 40 | source=bld.path.ant_glob(['**/*.cpp'], excl=['main.cpp']), |
| 41 | use='ndns-objects unit-tests-main BOOST', |
Shock Jiang | 0b165f4 | 2014-10-24 09:08:09 -0700 | [diff] [blame] | 42 | install_path=None, |
| 43 | defines='TEST_CONFIG_PATH=\"%s/conf-test\"' %(bld.bldnode) |
| 44 | ) |