diff --git a/Tools/autotest/arducopter.py b/Tools/autotest/arducopter.py index 8396aca4e2..a80de7973d 100644 --- a/Tools/autotest/arducopter.py +++ b/Tools/autotest/arducopter.py @@ -9225,13 +9225,7 @@ class AutoTestCopter(vehicle_test_suite.TestSuite): (current_log_filepath, os.path.getsize(current_log_filepath)) )) - util.run_cmd( - ['build/sitl/tool/Replay', current_log_filepath], - directory=util.topdir(), - checkfail=True, - show=True, - output=True, - ) + self.run_replay(current_log_filepath) self.context_pop() diff --git a/Tools/autotest/vehicle_test_suite.py b/Tools/autotest/vehicle_test_suite.py index 73c84b83a3..20165f0ab9 100644 --- a/Tools/autotest/vehicle_test_suite.py +++ b/Tools/autotest/vehicle_test_suite.py @@ -13852,6 +13852,17 @@ switch value''' # heading seemingly indefinitely. self.reboot_sitl() + def run_replay(self, filepath): + '''runs replay in filepath, returns filepath to Replay logfile''' + util.run_cmd( + ['build/sitl/tool/Replay', filepath], + directory=util.topdir(), + checkfail=True, + show=True, + output=True, + ) + return self.current_onboard_log_filepath() + def AHRS_ORIENTATION(self): '''test AHRS_ORIENTATION parameter works''' self.context_push()