Files
NFD/tests/wscript
T
Alexander Afanasyev 3ecec50221 rib: Integrating NRD code into NFD codebase
Change-Id: I3e548f974255f62a4680cfc6c12be3bb7a3db4d2
Refs: #1486
2014-04-16 21:27:43 -07:00

79 lines
2.9 KiB
Python

# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
"""
Copyright (c) 2014 Regents of the University of California,
Arizona Board of Regents,
Colorado State University,
University Pierre & Marie Curie, Sorbonne University,
Washington University in St. Louis,
Beijing Institute of Technology
This file is part of NFD (Named Data Networking Forwarding Daemon).
See AUTHORS.md for complete list of NFD authors and contributors.
NFD is free software: you can redistribute it and/or modify it under the terms
of the GNU General Public License as published by the Free Software Foundation,
either version 3 of the License, or (at your option) any later version.
NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
NFD, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
"""
top = '..'
def build(bld):
# Unit tests
if bld.env['WITH_TESTS']:
unit_test_main = bld(
target='unit-tests-main',
name='unit-tests-main',
features='cxx',
source=bld.path.ant_glob(['*.cpp']),
use='core-objects',
)
# core tests
unit_tests_core = bld.program(
target='../unit-tests-core',
features='cxx cxxprogram',
source=bld.path.ant_glob(['core/**/*.cpp']),
use='core-objects unit-tests-main',
includes='.',
install_prefix=None,
)
# NFD tests
unit_tests_nfd = bld.program(
target='../unit-tests-daemon',
features='cxx cxxprogram',
source=bld.path.ant_glob(['daemon/**/*.cpp'],
excl=['daemon/face/ethernet.cpp',
'daemon/face/unix-*.cpp']),
use='daemon-objects unit-tests-main',
includes='.',
install_prefix=None,
)
if bld.env['HAVE_LIBPCAP']:
unit_tests_nfd.source += bld.path.ant_glob('daemon/face/ethernet.cpp')
if bld.env['HAVE_UNIX_SOCKETS']:
unit_tests_nfd.source += bld.path.ant_glob('daemon/face/unix-*.cpp')
unit_tests_rib = bld.program(
target='../unit-tests-rib',
features='cxx cxxprogram',
source=bld.path.ant_glob(['rib/**/*.cpp']),
use='rib-objects unit-tests-main',
includes=['.'],
install_prefix=None,
)
# Other tests (e.g., stress tests that can be enabled even if unit tests are disabled)
if bld.env['WITH_TESTS'] or bld.env['WITH_OTHER_TESTS']:
bld.recurse("other")