Junxiao Shi | 2713a3b | 2015-06-22 16:19:05 -0700 | [diff] [blame] | 1 | # -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- |
| 2 | top = '..' |
| 3 | |
| 4 | def build(bld): |
Davide Pesavento | ae37cf3 | 2019-02-20 18:19:22 -0500 | [diff] [blame] | 5 | if not bld.env.WITH_TESTS: |
Junxiao Shi | 2713a3b | 2015-06-22 16:19:05 -0700 | [diff] [blame] | 6 | return |
| 7 | |
Davide Pesavento | 6677762 | 2020-10-09 18:46:03 -0400 | [diff] [blame^] | 8 | tmpdir = 'UNIT_TESTS_TMPDIR="%s"' % bld.bldnode.make_node('tmp-files') |
Alexander Afanasyev | 20c85cb | 2018-03-09 17:50:14 -0500 | [diff] [blame] | 9 | bld.program( |
| 10 | target='../unit-tests', |
| 11 | name='unit-tests', |
Davide Pesavento | ae37cf3 | 2019-02-20 18:19:22 -0500 | [diff] [blame] | 12 | source=bld.path.ant_glob(['*.cpp'] + ['%s/**/*.cpp' % tool for tool in bld.env.BUILD_TOOLS]), |
| 13 | use=['core-objects'] + ['%s-objects' % tool for tool in bld.env.BUILD_TOOLS], |
Davide Pesavento | 6677762 | 2020-10-09 18:46:03 -0400 | [diff] [blame^] | 14 | defines=[tmpdir], |
Davide Pesavento | ae37cf3 | 2019-02-20 18:19:22 -0500 | [diff] [blame] | 15 | install_path=None) |