waf: cope with CI python oddity

This commit is contained in:
Andrew Tridgell 2024-04-26 10:52:30 +10:00 committed by Randy Mackay
parent 5ce2924f64
commit 1e1d4a837d
4 changed files with 9 additions and 4 deletions

View File

@ -206,6 +206,8 @@ class ap_library_check_headers(Task.Task):
# force dependency scan, if necessary # force dependency scan, if necessary
self.compiled_task.signature() self.compiled_task.signature()
if not self.compiled_task.uid() in self.generator.bld.node_deps:
return r, []
for n in self.generator.bld.node_deps[self.compiled_task.uid()]: for n in self.generator.bld.node_deps[self.compiled_task.uid()]:
# using common Node methods doesn't work here # using common Node methods doesn't work here
p = n.abspath() p = n.abspath()

View File

@ -18,7 +18,11 @@ import base64
_dynamic_env_data = {} _dynamic_env_data = {}
def _load_dynamic_env_data(bld): def _load_dynamic_env_data(bld):
bldnode = bld.bldnode.make_node('modules/ChibiOS') bldnode = bld.bldnode.make_node('modules/ChibiOS')
tmp_str = bldnode.find_node('include_dirs').read() include_dirs_node = bldnode.find_node('include_dirs')
if include_dirs_node is None:
_dynamic_env_data['include_dirs'] = []
return
tmp_str = include_dirs_node.read()
tmp_str = tmp_str.replace(';\n','') tmp_str = tmp_str.replace(';\n','')
tmp_str = tmp_str.replace('-I','') #remove existing -I flags tmp_str = tmp_str.replace('-I','') #remove existing -I flags
# split, coping with separator # split, coping with separator

View File

@ -91,7 +91,7 @@ class update_submodule(Task.Task):
else: else:
r = Task.RUN_ME r = Task.RUN_ME
if self.non_fast_forward: if getattr(self,'non_fast_forward',[]):
r = Task.SKIP_ME r = Task.SKIP_ME
return r return r
@ -148,7 +148,7 @@ def git_submodule(bld, git_submodule, **kw):
def _post_fun(bld): def _post_fun(bld):
Logs.info('') Logs.info('')
for name, t in _submodules_tasks.items(): for name, t in _submodules_tasks.items():
if not t.non_fast_forward: if not getattr(t,'non_fast_forward',[]):
continue continue
Logs.warn("Submodule %s not updated: non-fastforward" % name) Logs.warn("Submodule %s not updated: non-fastforward" % name)

View File

@ -528,7 +528,6 @@ def configure(cfg):
cfg.msg('Setting board to', cfg.options.board) cfg.msg('Setting board to', cfg.options.board)
cfg.get_board().configure(cfg) cfg.get_board().configure(cfg)
cfg.load('clang_compilation_database')
cfg.load('waf_unit_test') cfg.load('waf_unit_test')
cfg.load('mavgen') cfg.load('mavgen')
cfg.load('dronecangen') cfg.load('dronecangen')