blob: 76996dc4928f1f1e77f54553ac1ec6d51205461c [file] [log] [blame]
Spyridon Mastorakisb4bd4b72015-01-05 17:41:12 -08001## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
2
Spyridon Mastorakisb4bd4b72015-01-05 17:41:12 -08003def build(bld):
Yuanzhi Gaoa5587ca2015-02-27 18:09:41 -08004 # To allow tests to use features from all enabled modules
Spyridon Mastorakisb4bd4b72015-01-05 17:41:12 -08005 all_modules = [mod[len("ns3-"):] for mod in bld.env['NS3_ENABLED_MODULES']]
6
Yuanzhi Gaoa5587ca2015-02-27 18:09:41 -08007 # Unit tests
8 tests = bld.create_ns3_program('ndnSIM-unit-tests', all_modules)
Alexander Afanasyevf326f942016-09-08 17:17:05 -07009 tests.source = bld.path.ant_glob(['main.cpp', 'unit-tests/**/*.cpp'])
Yuanzhi Gaoa5587ca2015-02-27 18:09:41 -080010 tests.includes = ['#', '.', '../NFD/', "../NFD/daemon", "../NFD/core", "../helper", "../model", "../apps", "../utils", "../examples"]
Alexander Afanasyev929b17e2015-08-13 16:54:09 -070011 tests.defines = 'TEST_CONFIG_PATH=\"%s/conf-test\"' %(bld.bldnode)
Yuanzhi Gaoa5587ca2015-02-27 18:09:41 -080012
Alexander Afanasyevf326f942016-09-08 17:17:05 -070013 # Other tests
14 for i in bld.path.ant_glob(['other/*.cpp']):
15 name = str(i)[:-len(".cpp")]
16 obj = bld.create_ns3_program(name, all_modules)
17 obj.source = [i] + bld.path.ant_glob(['%s/**/*.cpp' % name])
18 obj.install_path = None