blob: 3b485717836d328853e9f7c4842fb8a2c8973a61 [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'),
use='validator-sample',
ANCHORPATH='\"anchors/root.cert\"',
RELATION='is-prefix-of',
)
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])