From 67f137736ae28d059997c69f3c135533b6aa8c64 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Thu, 27 Apr 2023 07:51:01 +1000 Subject: [PATCH] autotest: fix disable-in-turn dependency issue --- Tools/autotest/test_build_options.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Tools/autotest/test_build_options.py b/Tools/autotest/test_build_options.py index ccf51eed36..0555ace3fc 100755 --- a/Tools/autotest/test_build_options.py +++ b/Tools/autotest/test_build_options.py @@ -294,10 +294,11 @@ class TestBuildOptions(object): def run_disable_in_turn(self): options = self.get_build_options_from_ardupilot_tree() - if self.match_glob is not None: - options = list(filter(lambda x : fnmatch.fnmatch(x.define, self.match_glob), options)) count = 1 for feature in sorted(options, key=lambda x : x.define): + if self.match_glob is not None: + if not fnmatch.fnmatch(feature.define, self.match_glob): + continue with open("/tmp/run-disable-in-turn-progress", "w") as f: print(f.write(f"{count}/{len(options)} {feature.define}\n")) # if feature.define < "WINCH_ENABLED":