Spyridon Mastorakis | b4bd4b7 | 2015-01-05 17:41:12 -0800 | [diff] [blame] | 1 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- |
| 2 | |
Spyridon Mastorakis | b4bd4b7 | 2015-01-05 17:41:12 -0800 | [diff] [blame] | 3 | def build(bld): |
Yuanzhi Gao | a5587ca | 2015-02-27 18:09:41 -0800 | [diff] [blame] | 4 | # To allow tests to use features from all enabled modules |
Spyridon Mastorakis | b4bd4b7 | 2015-01-05 17:41:12 -0800 | [diff] [blame] | 5 | all_modules = [mod[len("ns3-"):] for mod in bld.env['NS3_ENABLED_MODULES']] |
| 6 | |
Yuanzhi Gao | a5587ca | 2015-02-27 18:09:41 -0800 | [diff] [blame] | 7 | # Unit tests |
| 8 | tests = bld.create_ns3_program('ndnSIM-unit-tests', all_modules) |
Alexander Afanasyev | 325c253 | 2016-09-08 15:38:53 -0700 | [diff] [blame^] | 9 | tests.source = bld.path.ant_glob(['main.cpp', 'unit-tests/**/*.cpp'], |
| 10 | excl=['unit-tests/*/**/*.cpp']) |
Yuanzhi Gao | a5587ca | 2015-02-27 18:09:41 -0800 | [diff] [blame] | 11 | tests.includes = ['#', '.', '../NFD/', "../NFD/daemon", "../NFD/core", "../helper", "../model", "../apps", "../utils", "../examples"] |
Alexander Afanasyev | 929b17e | 2015-08-13 16:54:09 -0700 | [diff] [blame] | 12 | tests.defines = 'TEST_CONFIG_PATH=\"%s/conf-test\"' %(bld.bldnode) |
Yuanzhi Gao | a5587ca | 2015-02-27 18:09:41 -0800 | [diff] [blame] | 13 | |
Alexander Afanasyev | 325c253 | 2016-09-08 15:38:53 -0700 | [diff] [blame^] | 14 | # # Other tests |
| 15 | # for i in bld.path.ant_glob(['other/*.cpp']): |
| 16 | # name = str(i)[:-len(".cpp")] |
| 17 | # obj = bld.create_ns3_program(name, all_modules) |
| 18 | # obj.source = [i] + bld.path.ant_glob(['%s/**/*.cpp' % name]) |
| 19 | # obj.install_path = None |