ci: Enable coverage report and allow unit test output in XML format
Change-Id: I952654aa25d2bdfb5ba1885d1c7570cfdb7e3edf
diff --git a/tests/wscript b/tests/wscript
index fa36e78..25708c0 100644
--- a/tests/wscript
+++ b/tests/wscript
@@ -10,28 +10,35 @@
dst = bld.bldnode.make_node("conf-test/anchors")
dst.mkdir()
- bld(features = "subst",
- name = 'test-validator-conf',
- source = '../validator.conf.sample.in',
- target = '../conf-test/validator.conf',
- use = 'validator-sample',
+ bld(features="subst",
+ name='test-validator-conf',
+ source='../validator.conf.sample.in',
+ target='../conf-test/validator.conf',
+ use='validator-sample',
ANCHORPATH='\"anchors/root.cert\"',
RELATION='is-prefix-of',
)
- bld(features = "subst",
- name = 'test-logger-conf',
- source = '../log4cxx.properties.sample.in',
- target = '../conf-test/log4cxx.properties.sample',
- is_copy = True,
- use = 'log4cxx-sample',
+ bld(features="subst",
+ name='test-logger-conf',
+ source='../log4cxx.properties.sample.in',
+ target='../conf-test/log4cxx.properties.sample',
+ is_copy=True,
+ use='log4cxx-sample',
)
+ bld(features='cxx',
+ name='unit-tests-main',
+ target='unit-tests-main',
+ source='main.cpp',
+ defines=['BOOST_TEST_MODULE=NDNS Unit Tests'],
+ use='ndns-objects BOOST')
+
unit_tests = bld.program(
target='../unit-tests',
features='cxx cxxprogram',
- source=bld.path.ant_glob(['**/*.cpp']),
- use='ndns-objects',
+ source=bld.path.ant_glob(['**/*.cpp'], excl=['main.cpp']),
+ use='ndns-objects unit-tests-main BOOST',
install_path=None,
defines='TEST_CONFIG_PATH=\"%s/conf-test\"' %(bld.bldnode)
)