blob: 6f3ddb30c481971afb0f27c1dde6ca745e5af867 [file] [log] [blame]
# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
from waflib import Utils, Context
top = '..'
def build(bld):
if not bld.env['WITH_TESTS']:
return
tmp_folder = bld.bldnode.make_node('tmp-files')
config_path = 'TEST_CONFIG_PATH="%s"' % tmp_folder
tmp_folder.make_node('anchors').mkdir()
bld(features="subst",
name='test-validator-conf',
source='../validator.conf.sample.in',
target=tmp_folder.make_node('validator.conf'),
ANCHORPATH='\"anchors/root.cert\"')
bld.objects(
target='unit-tests-main',
source='main.cpp',
defines=['BOOST_TEST_MODULE=NDNS Unit Tests', config_path],
use='ndns-objects')
bld.program(
target='../unit-tests',
name='unit-tests',
source=bld.path.ant_glob('**/*.cpp', excl=['main.cpp']),
use='ndns-objects unit-tests-main',
includes='../src .',
install_path=None,
defines=[config_path])