blob: e2e44d921bee04ff25018d9b2e3efc710710c0bc [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"""
Alexander Afanasyevbe998ac2017-05-06 13:11:42 -07004Copyright (c) 2014-2017, Regents of the University of California
Yingdi Yuc9843cf2014-08-04 17:52:19 -07005
Alexander Afanasyevbe998ac2017-05-06 13:11:42 -07006This file is part of NDN DeLorean, An Authentication System for Data Archives in
7Named Data Networking. See AUTHORS.md for complete list of NDN DeLorean authors
8and contributors.
Yingdi Yuc9843cf2014-08-04 17:52:19 -07009
Alexander Afanasyevbe998ac2017-05-06 13:11:42 -070010NDN DeLorean is free software: you can redistribute it and/or modify it under
11the terms of the GNU General Public License as published by the Free Software
12Foundation, either version 3 of the License, or (at your option) any later
13version.
Yingdi Yuc9843cf2014-08-04 17:52:19 -070014
Alexander Afanasyevbe998ac2017-05-06 13:11:42 -070015NDN DeLorean is distributed in the hope that it will be useful, but WITHOUT ANY
16WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
17PARTICULAR PURPOSE. See the GNU General Public License for more details.
Yingdi Yuc9843cf2014-08-04 17:52:19 -070018
Alexander Afanasyevbe998ac2017-05-06 13:11:42 -070019You should have received a copy of the GNU General Public License along with NDN
20DeLorean, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
Yingdi Yuc9843cf2014-08-04 17:52:19 -070021"""
22
23top = '..'
24
25def build(bld):
26 # Unit tests
27 if bld.env['WITH_TESTS']:
28 # main()
29 unit_test_main = bld(
30 target='unit-tests-main',
31 name='unit-tests-main',
32 features='cxx',
33 use='core-objects',
34 source='main.cpp',
35 install_path=None,
36 )
37
38 # common test modules
39 unit_test_base = bld(
40 target='unit-tests-base',
41 name='unit-tests-base',
42 features='cxx',
43 source=bld.path.ant_glob(['*.cpp'], excl='main.cpp'),
44 use='core-objects',
45 headers='../common.hpp boost-test.hpp',
46 install_path=None,
Yingdi Yu0c3e5912015-03-17 14:22:38 -070047 defines=['TEST_HOME_PATH=\"%s/home-tests\"' %(bld.bldnode)],
Yingdi Yuc9843cf2014-08-04 17:52:19 -070048 )
49
50 # unit tests
51 unit_tests = bld.program(
52 target='../unit-tests',
53 features='cxx cxxprogram',
Yingdi Yu0c3e5912015-03-17 14:22:38 -070054 source=bld.path.ant_glob(['core/**/*.t.cpp', 'daemon/**/*.t.cpp']),
Yingdi Yuc9843cf2014-08-04 17:52:19 -070055 use='core-objects daemon-objects unit-tests-base unit-tests-main',
56 includes='.',
57 install_path=None,
Yingdi Yu0c3e5912015-03-17 14:22:38 -070058 defines=['TEST_DB_PATH=\"%s/db-tests\"' %(bld.bldnode),
59 'TEST_KEYCHAIN_PATH=\"%s/keychain-tests\"' %(bld.bldnode),
60 'TEST_LOGGER_PATH=\"%s/logger-tests\"' %(bld.bldnode)],
Yingdi Yuc9843cf2014-08-04 17:52:19 -070061 )