Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split Plane tests into two parts for github workflows #28280

Merged
merged 3 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/test_sitl_plane.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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,
]

Expand Down
26 changes: 24 additions & 2 deletions Tools/autotest/arduplane.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -6232,6 +6233,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,
Expand Down Expand Up @@ -6289,6 +6297,11 @@ def tests(self):
self.Soaring,
self.Terrain,
self.TerrainMission,
])
return ret

def tests1b(self):
return [
self.TerrainLoiter,
self.VectorNavEAHRS,
self.MicroStrainEAHRS5,
Expand Down Expand Up @@ -6365,8 +6378,7 @@ def tests(self):
self.MAV_CMD_EXTERNAL_WIND_ESTIMATE,
self.GliderPullup,
self.BadRollChannelDefined,
])
return ret
]

def disabled_tests(self):
return {
Expand All @@ -6375,3 +6387,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()
8 changes: 8 additions & 0 deletions Tools/autotest/autotest.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,9 @@ def should_run_step(step):
"CopterTests2b": "arducopter",

"Plane": "arduplane",
"PlaneTests1a": "arduplane",
"PlaneTests1b": "arduplane",

"Rover": "ardurover",
"Tracker": "antennatracker",
"Helicopter": "arducopter-heli",
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -1112,6 +1117,9 @@ def format_epilog(self, formatter):
'test.CopterTests2a',
'test.CopterTests2b',

'test.PlaneTests1a',
'test.PlaneTests1b',

'clang-scan-build',
]

Expand Down
8 changes: 6 additions & 2 deletions Tools/scripts/build_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading