Zhiyi Zhang | 8617a79 | 2017-01-17 16:45:56 -0800 | [diff] [blame] | 1 | # -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- |
Zhiyi Zhang | 8617a79 | 2017-01-17 16:45:56 -0800 | [diff] [blame] | 2 | top = '..' |
| 3 | |
| 4 | def build(bld): |
Davide Pesavento | 55d9860 | 2019-10-15 22:40:05 -0400 | [diff] [blame] | 5 | if not bld.env.WITH_TESTS: |
Zhiyi Zhang | 8617a79 | 2017-01-17 16:45:56 -0800 | [diff] [blame] | 6 | return |
| 7 | |
Davide Pesavento | 725d3fc | 2021-11-19 23:37:03 -0500 | [diff] [blame^] | 8 | tmpdir = 'TMP_TESTS_PATH="%s"' % bld.bldnode.make_node('tmp-files') |
Davide Pesavento | 55d9860 | 2019-10-15 22:40:05 -0400 | [diff] [blame] | 9 | bld.program( |
| 10 | target='../unit-tests', |
| 11 | name='unit-tests', |
| 12 | source=bld.path.ant_glob(['*.cpp', 'unit-tests/**/*.cpp']), |
Davide Pesavento | 725d3fc | 2021-11-19 23:37:03 -0500 | [diff] [blame^] | 13 | use='ndn-cert', |
Davide Pesavento | 55d9860 | 2019-10-15 22:40:05 -0400 | [diff] [blame] | 14 | includes='.', |
Davide Pesavento | 725d3fc | 2021-11-19 23:37:03 -0500 | [diff] [blame^] | 15 | defines=[tmpdir], |
Davide Pesavento | 55d9860 | 2019-10-15 22:40:05 -0400 | [diff] [blame] | 16 | install_path=None) |