blob: 0a53f7c7577de013d481f1f7f12677e54f51d988 [file] [log] [blame]
Yingdi Yuc9843cf2014-08-04 17:52:19 -07001# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
2
3"""
4Copyright (c) 2014, Regents of the University of California
5
6This file is part of NSL (NDN Signature Logger).
7See AUTHORS.md for complete list of NSL authors and contributors.
8
9NSL is free software: you can redistribute it and/or modify it under the terms
10of the GNU General Public License as published by the Free Software Foundation,
11either version 3 of the License, or (at your option) any later version.
12
13NSL is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
14without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15PURPOSE. See the GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License along with
18NSL, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
19"""
20
21top = '..'
22
23def build(bld):
24 # Unit tests
25 if bld.env['WITH_TESTS']:
26 # main()
27 unit_test_main = bld(
28 target='unit-tests-main',
29 name='unit-tests-main',
30 features='cxx',
31 use='core-objects',
32 source='main.cpp',
33 install_path=None,
34 )
35
36 # common test modules
37 unit_test_base = bld(
38 target='unit-tests-base',
39 name='unit-tests-base',
40 features='cxx',
41 source=bld.path.ant_glob(['*.cpp'], excl='main.cpp'),
42 use='core-objects',
43 headers='../common.hpp boost-test.hpp',
44 install_path=None,
45 )
46
47 # unit tests
48 unit_tests = bld.program(
49 target='../unit-tests',
50 features='cxx cxxprogram',
51 source=bld.path.ant_glob(['core/**/*.cpp', 'daemon/**/*.cpp']),
52 use='core-objects daemon-objects unit-tests-base unit-tests-main',
53 includes='.',
54 install_path=None,
55 )