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 | |
| 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', |
| 18 | ANCHORPATH='\"anchors/root.cert\"', |
| 19 | RELATION='is-prefix-of', |
| 20 | ) |
| 21 | |
| 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', |
| 28 | ) |
| 29 | |
| 30 | unit_tests = bld.program( |
| 31 | target='../unit-tests', |
| 32 | features='cxx cxxprogram', |
| 33 | source=bld.path.ant_glob(['**/*.cpp']), |
| 34 | use='ndns-objects', |
| 35 | install_path=None, |
| 36 | defines='TEST_CONFIG_PATH=\"%s/conf-test\"' %(bld.bldnode) |
| 37 | ) |