From 8fdfdebe55f035c06fa09c7f331db8c6995dc146 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Sat, 1 May 2021 13:49:18 +1000 Subject: [PATCH] autotest: pass sitl_commandline_customised up the context stack We're running tests on the Callisto frame when we shouldn't in Copter as the information was lost in nested Contexts. We can only reset the SITL commandline at an actual Test level - if a defaults file has been used then it is unclear as to what the state of any parameter is in storage as we move between contexts --- Tools/autotest/common.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Tools/autotest/common.py b/Tools/autotest/common.py index 11bdaddd4f..7f622c7ddc 100644 --- a/Tools/autotest/common.py +++ b/Tools/autotest/common.py @@ -4155,6 +4155,9 @@ class AutoTest(ABC): def context_pop(self): """Set parameters to origin values in reverse order.""" dead = self.contexts.pop() + if dead.sitl_commandline_customised and len(self.contexts): + self.contexts[-1].sitl_commandline_customised = True + dead_parameters_dict = {} for p in dead.parameters: dead_parameters_dict[p[0]] = p[1]