mirror of https://github.com/ArduPilot/ardupilot
waf: link tests with gtest library from submodule
That makes it possible to build tests on distributions that don't provide official packages for gtest. For example, the travis environment is Ubuntu, which doesn't have official package for gtest library.
This commit is contained in:
parent
8d0522f6ef
commit
e9195a3989
13
wscript
13
wscript
|
@ -80,6 +80,7 @@ def configure(cfg):
|
|||
cfg.load('waf_unit_test')
|
||||
cfg.load('mavgen')
|
||||
cfg.load('gbenchmark')
|
||||
cfg.load('gtest')
|
||||
cfg.load('static_linking')
|
||||
|
||||
cfg.start_msg('Benchmarks')
|
||||
|
@ -88,12 +89,11 @@ def configure(cfg):
|
|||
else:
|
||||
cfg.end_msg('disabled', color='YELLOW')
|
||||
|
||||
cfg.env.HAS_GTEST = cfg.check_cxx(
|
||||
lib='gtest',
|
||||
mandatory=False,
|
||||
uselib_store='GTEST',
|
||||
errmsg='not found, unit tests disabled',
|
||||
)
|
||||
cfg.start_msg('Unit tests')
|
||||
if cfg.env.HAS_GTEST:
|
||||
cfg.end_msg('enabled')
|
||||
else:
|
||||
cfg.end_msg('disabled', color='YELLOW')
|
||||
|
||||
cfg.env.prepend_value('INCLUDES', [
|
||||
cfg.srcnode.abspath() + '/libraries/',
|
||||
|
@ -117,6 +117,7 @@ def list_boards(ctx):
|
|||
print(*boards.get_boards_names())
|
||||
|
||||
def build(bld):
|
||||
bld.load('gtest')
|
||||
|
||||
#generate mavlink headers
|
||||
bld(
|
||||
|
|
Loading…
Reference in New Issue