blob: 624987466ba145d381ad412e0f0d5f7f0b4ef725 [file] [log] [blame]
# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
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',
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])