mirror of https://github.com/ArduPilot/ardupilot
waf: add post build callbacks in separate function
That makes it easier see what callbacks are or not being added and the order they are executed. While at it, don't add build summary callback when in a check command.
This commit is contained in:
parent
d1c5691501
commit
cb1c7b66cb
15
wscript
15
wscript
|
@ -217,10 +217,9 @@ def _build_cmd_tweaks(bld):
|
|||
bld.cmd = 'check'
|
||||
|
||||
if bld.cmd == 'check':
|
||||
bld.options.clear_failed_tests = True
|
||||
if not bld.env.HAS_GTEST:
|
||||
bld.fatal('check: gtest library is required')
|
||||
bld.add_post_fun(ardupilotwaf.test_summary)
|
||||
bld.options.clear_failed_tests = True
|
||||
|
||||
def _build_dynamic_sources(bld):
|
||||
bld(
|
||||
|
@ -307,6 +306,14 @@ def _write_version_header(tsk):
|
|||
bld = tsk.generator.bld
|
||||
return bld.write_version_header(tsk.outputs[0].abspath())
|
||||
|
||||
def _build_post_funs(bld):
|
||||
if bld.cmd == 'check':
|
||||
bld.add_post_fun(ardupilotwaf.test_summary)
|
||||
else:
|
||||
bld.build_summary_post_fun()
|
||||
|
||||
if bld.env.SUBMODULE_UPDATE:
|
||||
bld.git_submodule_post_fun()
|
||||
|
||||
def build(bld):
|
||||
config_hash = Utils.h_file(bld.bldnode.make_node('ap_config.h').abspath())
|
||||
|
@ -341,9 +348,7 @@ def build(bld):
|
|||
group='dynamic_sources',
|
||||
)
|
||||
|
||||
bld.load('build_summary')
|
||||
if bld.env.SUBMODULE_UPDATE:
|
||||
bld.git_submodule_post_fun()
|
||||
_build_post_funs(bld)
|
||||
|
||||
ardupilotwaf.build_command('check',
|
||||
program_group_list='all',
|
||||
|
|
Loading…
Reference in New Issue