From e8dff606fd4b78cfba65bf72288868561798c69c Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Wed, 2 Oct 2024 15:22:35 +1000 Subject: [PATCH 1/3] .github: split Plane tests into tests1a and tests1b --- .github/workflows/test_sitl_plane.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_sitl_plane.yml b/.github/workflows/test_sitl_plane.yml index ece1dbfa67dd5..34c112e59b3d3 100644 --- a/.github/workflows/test_sitl_plane.yml +++ b/.github/workflows/test_sitl_plane.yml @@ -213,7 +213,8 @@ jobs: fail-fast: false # don't cancel if a job from the matrix fails matrix: config: [ - sitltest-plane, + sitltest-plane-tests1a, + sitltest-plane-tests1b, sitltest-quadplane, ] From 43a3923ee0c8cde3fedcd25daf436225929fd186 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Wed, 2 Oct 2024 15:22:36 +1000 Subject: [PATCH 2/3] Tools: split Plane tests into tests1a and tests1b --- Tools/autotest/arduplane.py | 25 +++++++++++++++++++++++-- Tools/autotest/autotest.py | 8 ++++++++ Tools/scripts/build_ci.sh | 8 ++++++-- 3 files changed, 37 insertions(+), 4 deletions(-) diff --git a/Tools/autotest/arduplane.py b/Tools/autotest/arduplane.py index 10324ad08b421..e178a8c7db70c 100644 --- a/Tools/autotest/arduplane.py +++ b/Tools/autotest/arduplane.py @@ -6232,6 +6232,13 @@ def MAV_CMD_NAV_LOITER_TO_ALT(self): def tests(self): '''return list of all tests''' + ret = [] + ret.extend(self.tests1a()) + ret.extend(self.tests1b()) + return ret + + def tests1a(self): + ret = [] ret = super(AutoTestPlane, self).tests() ret.extend([ self.AuxModeSwitch, @@ -6289,6 +6296,11 @@ def tests(self): self.Soaring, self.Terrain, self.TerrainMission, + ]) + return ret + + def tests1b(self): + return [ self.TerrainLoiter, self.VectorNavEAHRS, self.MicroStrainEAHRS5, @@ -6365,8 +6377,7 @@ def tests(self): self.MAV_CMD_EXTERNAL_WIND_ESTIMATE, self.GliderPullup, self.BadRollChannelDefined, - ]) - return ret + ] def disabled_tests(self): return { @@ -6375,3 +6386,13 @@ def disabled_tests(self): "ClimbThrottleSaturation": "requires https://github.com/ArduPilot/ardupilot/pull/27106 to pass", "SetHomeAltChange": "https://github.com/ArduPilot/ardupilot/issues/5672", } + + +class AutoTestPlaneTests1a(AutoTestPlane): + def tests(self): + return self.tests1a() + + +class AutoTestPlaneTests1b(AutoTestPlane): + def tests(self): + return self.tests1b() diff --git a/Tools/autotest/autotest.py b/Tools/autotest/autotest.py index 74f08297f1fff..296c930d4faf7 100755 --- a/Tools/autotest/autotest.py +++ b/Tools/autotest/autotest.py @@ -278,6 +278,9 @@ def should_run_step(step): "CopterTests2b": "arducopter", "Plane": "arduplane", + "PlaneTests1a": "arduplane", + "PlaneTests1b": "arduplane", + "Rover": "ardurover", "Tracker": "antennatracker", "Helicopter": "arducopter-heli", @@ -352,6 +355,8 @@ def find_specific_test_to_run(step): "test.CopterTests2a": arducopter.AutoTestCopterTests2a, # 8m23s "test.CopterTests2b": arducopter.AutoTestCopterTests2b, # 8m18s "test.Plane": arduplane.AutoTestPlane, + "test.PlaneTests1a": arduplane.AutoTestPlaneTests1a, + "test.PlaneTests1b": arduplane.AutoTestPlaneTests1b, "test.QuadPlane": quadplane.AutoTestQuadPlane, "test.Rover": rover.AutoTestRover, "test.BalanceBot": balancebot.AutoTestBalanceBot, @@ -1112,6 +1117,9 @@ def format_epilog(self, formatter): 'test.CopterTests2a', 'test.CopterTests2b', + 'test.PlaneTests1a', + 'test.PlaneTests1b', + 'clang-scan-build', ] diff --git a/Tools/scripts/build_ci.sh b/Tools/scripts/build_ci.sh index cd20a58a53235..4d018d415a828 100755 --- a/Tools/scripts/build_ci.sh +++ b/Tools/scripts/build_ci.sh @@ -135,8 +135,12 @@ for t in $CI_BUILD_TARGET; do run_autotest "Copter" "build.SITLPeriphUniversal" "test.CAN" continue fi - if [ "$t" == "sitltest-plane" ]; then - run_autotest "Plane" "build.Plane" "test.Plane" + if [ "$t" == "sitltest-plane-tests1a" ]; then + run_autotest "Plane" "build.Plane" "test.PlaneTests1a" + continue + fi + if [ "$t" == "sitltest-plane-tests1b" ]; then + run_autotest "Plane" "build.Plane" "test.PlaneTests1b" continue fi if [ "$t" == "sitltest-quadplane" ]; then From 047414c83e185f9aadc7ee1440e370f804fcec7c Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Wed, 2 Oct 2024 16:20:04 +1000 Subject: [PATCH 3/3] autotest: install terrain handlers in TerrainLoiter test needs terrain, was passing because previous tests were providing hte autopilot with the data --- Tools/autotest/arduplane.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Tools/autotest/arduplane.py b/Tools/autotest/arduplane.py index e178a8c7db70c..5a17c5089db28 100644 --- a/Tools/autotest/arduplane.py +++ b/Tools/autotest/arduplane.py @@ -2924,6 +2924,7 @@ def Terrain(self): def TerrainLoiter(self): '''Test terrain following in loiter''' self.context_push() + self.install_terrain_handlers_context() self.set_parameters({ "TERRAIN_FOLLOW": 1, # enable terrain following in loiter "WP_LOITER_RAD": 2000, # set very large loiter rad to get some terrain changes