Alexander Afanasyev | e83c056 | 2016-12-24 10:20:41 -0800 | [diff] [blame] | 1 | # -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- |
| 2 | |
| 3 | top = '..' |
| 4 | |
| 5 | from waflib import Logs |
| 6 | |
| 7 | def build(bld): |
Alexander Afanasyev | a9369b4 | 2017-01-11 11:58:00 -0800 | [diff] [blame] | 8 | if not bld.env['WITH_TESTS']: |
| 9 | return |
| 10 | |
Yukai Tu | ccdcdba | 2016-10-24 13:48:01 -0700 | [diff] [blame^] | 11 | Logs.error("Many unit tests are temporary disabled") |
Alexander Afanasyev | e83c056 | 2016-12-24 10:20:41 -0800 | [diff] [blame] | 12 | |
| 13 | bld(features='cxx', |
| 14 | target='unit-tests-main', |
| 15 | name='unit-tests-main', |
| 16 | source='main.cpp', |
| 17 | use='BOOST', |
Alexander Afanasyev | 8495a4a | 2016-12-25 15:27:25 -0800 | [diff] [blame] | 18 | includes='.. .', |
| 19 | defines=['BOOST_TEST_MODULE=ChronoShare Unit Tests']) |
Alexander Afanasyev | e83c056 | 2016-12-24 10:20:41 -0800 | [diff] [blame] | 20 | |
| 21 | unit_tests = bld.program( |
| 22 | target='../unit-tests', |
| 23 | features='cxx cxxprogram', |
Yukai Tu | ccdcdba | 2016-10-24 13:48:01 -0700 | [diff] [blame^] | 24 | source=bld.path.ant_glob(['*.cpp', |
| 25 | 'unit-tests/sync-*.t.cpp', |
| 26 | ], |
| 27 | excl=['main.cpp']), |
Alexander Afanasyev | a9369b4 | 2017-01-11 11:58:00 -0800 | [diff] [blame] | 28 | use='unit-tests-main core-objects chronoshare', |
Alexander Afanasyev | e83c056 | 2016-12-24 10:20:41 -0800 | [diff] [blame] | 29 | install_path=None, |
Alexander Afanasyev | 8495a4a | 2016-12-25 15:27:25 -0800 | [diff] [blame] | 30 | defines='UNIT_TEST_CONFIG_PATH=\"%s/tmp-files/\"' % (bld.bldnode), |
| 31 | includes='.. ../src .', |
Alexander Afanasyev | e83c056 | 2016-12-24 10:20:41 -0800 | [diff] [blame] | 32 | ) |