blob: b47447b3eaba2ae2c1bd5bb0fb75a1c4531183ef [file] [log] [blame]
Alexander Afanasyeve83c0562016-12-24 10:20:41 -08001# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
2
3top = '..'
4
5from waflib import Logs
6
7def build(bld):
Alexander Afanasyeva9369b42017-01-11 11:58:00 -08008 if not bld.env['WITH_TESTS']:
9 return
10
Yukai Tuccdcdba2016-10-24 13:48:01 -070011 Logs.error("Many unit tests are temporary disabled")
Alexander Afanasyeve83c0562016-12-24 10:20:41 -080012
13 bld(features='cxx',
14 target='unit-tests-main',
15 name='unit-tests-main',
16 source='main.cpp',
17 use='BOOST',
Alexander Afanasyev8495a4a2016-12-25 15:27:25 -080018 includes='.. .',
19 defines=['BOOST_TEST_MODULE=ChronoShare Unit Tests'])
Alexander Afanasyeve83c0562016-12-24 10:20:41 -080020
21 unit_tests = bld.program(
22 target='../unit-tests',
23 features='cxx cxxprogram',
Yukai Tuccdcdba2016-10-24 13:48:01 -070024 source=bld.path.ant_glob(['*.cpp',
25 'unit-tests/sync-*.t.cpp',
26 ],
27 excl=['main.cpp']),
Alexander Afanasyeva9369b42017-01-11 11:58:00 -080028 use='unit-tests-main core-objects chronoshare',
Alexander Afanasyeve83c0562016-12-24 10:20:41 -080029 install_path=None,
Alexander Afanasyev8495a4a2016-12-25 15:27:25 -080030 defines='UNIT_TEST_CONFIG_PATH=\"%s/tmp-files/\"' % (bld.bldnode),
31 includes='.. ../src .',
Alexander Afanasyeve83c0562016-12-24 10:20:41 -080032 )