Yingdi Yu | c9843cf | 2014-08-04 17:52:19 -0700 | [diff] [blame] | 1 | # -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- |
| 2 | |
| 3 | """ |
Alexander Afanasyev | be998ac | 2017-05-06 13:11:42 -0700 | [diff] [blame^] | 4 | Copyright (c) 2014-2017, Regents of the University of California |
Yingdi Yu | c9843cf | 2014-08-04 17:52:19 -0700 | [diff] [blame] | 5 | |
Alexander Afanasyev | be998ac | 2017-05-06 13:11:42 -0700 | [diff] [blame^] | 6 | This file is part of NDN DeLorean, An Authentication System for Data Archives in |
| 7 | Named Data Networking. See AUTHORS.md for complete list of NDN DeLorean authors |
| 8 | and contributors. |
Yingdi Yu | c9843cf | 2014-08-04 17:52:19 -0700 | [diff] [blame] | 9 | |
Alexander Afanasyev | be998ac | 2017-05-06 13:11:42 -0700 | [diff] [blame^] | 10 | NDN DeLorean is free software: you can redistribute it and/or modify it under |
| 11 | the terms of the GNU General Public License as published by the Free Software |
| 12 | Foundation, either version 3 of the License, or (at your option) any later |
| 13 | version. |
Yingdi Yu | c9843cf | 2014-08-04 17:52:19 -0700 | [diff] [blame] | 14 | |
Alexander Afanasyev | be998ac | 2017-05-06 13:11:42 -0700 | [diff] [blame^] | 15 | NDN DeLorean is distributed in the hope that it will be useful, but WITHOUT ANY |
| 16 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
| 17 | PARTICULAR PURPOSE. See the GNU General Public License for more details. |
Yingdi Yu | c9843cf | 2014-08-04 17:52:19 -0700 | [diff] [blame] | 18 | |
Alexander Afanasyev | be998ac | 2017-05-06 13:11:42 -0700 | [diff] [blame^] | 19 | You should have received a copy of the GNU General Public License along with NDN |
| 20 | DeLorean, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>. |
Yingdi Yu | c9843cf | 2014-08-04 17:52:19 -0700 | [diff] [blame] | 21 | """ |
| 22 | |
| 23 | top = '..' |
| 24 | |
| 25 | def 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 Yu | 0c3e591 | 2015-03-17 14:22:38 -0700 | [diff] [blame] | 47 | defines=['TEST_HOME_PATH=\"%s/home-tests\"' %(bld.bldnode)], |
Yingdi Yu | c9843cf | 2014-08-04 17:52:19 -0700 | [diff] [blame] | 48 | ) |
| 49 | |
| 50 | # unit tests |
| 51 | unit_tests = bld.program( |
| 52 | target='../unit-tests', |
| 53 | features='cxx cxxprogram', |
Yingdi Yu | 0c3e591 | 2015-03-17 14:22:38 -0700 | [diff] [blame] | 54 | source=bld.path.ant_glob(['core/**/*.t.cpp', 'daemon/**/*.t.cpp']), |
Yingdi Yu | c9843cf | 2014-08-04 17:52:19 -0700 | [diff] [blame] | 55 | use='core-objects daemon-objects unit-tests-base unit-tests-main', |
| 56 | includes='.', |
| 57 | install_path=None, |
Yingdi Yu | 0c3e591 | 2015-03-17 14:22:38 -0700 | [diff] [blame] | 58 | 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 Yu | c9843cf | 2014-08-04 17:52:19 -0700 | [diff] [blame] | 61 | ) |