mirror of https://github.com/ArduPilot/ardupilot
autotest: fixed aerobatics test for new Schedules location
This commit is contained in:
parent
6a1b3d4e30
commit
76b83c3d57
|
@ -3961,7 +3961,8 @@ class AutoTestPlane(AutoTest):
|
|||
def AerobaticsScripting(self):
|
||||
'''Fixed Wing Aerobatics'''
|
||||
applet_script = "Aerobatics/FixedWing/plane_aerobatics.lua"
|
||||
trick72 = "Aerobatics/FixedWing/trick72.txt"
|
||||
airshow = "Aerobatics/FixedWing/Schedules/AirShow.txt"
|
||||
trick72 = "trick72.txt"
|
||||
|
||||
model = "plane-3d"
|
||||
|
||||
|
@ -3973,7 +3974,7 @@ class AutoTestPlane(AutoTest):
|
|||
|
||||
self.context_push()
|
||||
self.install_applet_script(applet_script)
|
||||
self.install_applet_script(trick72)
|
||||
self.install_applet_script(airshow, install_name=trick72)
|
||||
self.context_collect('STATUSTEXT')
|
||||
self.reboot_sitl()
|
||||
|
||||
|
|
|
@ -7073,8 +7073,12 @@ Also, ignores heartbeats not from our target system'''
|
|||
def installed_script_path(self, scriptname):
|
||||
return os.path.join("scripts", os.path.basename(scriptname))
|
||||
|
||||
def install_script(self, source, scriptname):
|
||||
dest = self.installed_script_path(scriptname)
|
||||
def install_script(self, source, scriptname, install_name=None):
|
||||
if install_name is not None:
|
||||
dest = self.installed_script_path(install_name)
|
||||
else:
|
||||
dest = self.installed_script_path(scriptname)
|
||||
|
||||
destdir = os.path.dirname(dest)
|
||||
if not os.path.exists(destdir):
|
||||
os.mkdir(destdir)
|
||||
|
@ -7089,9 +7093,9 @@ Also, ignores heartbeats not from our target system'''
|
|||
source = self.script_test_source_path(scriptname)
|
||||
self.install_script(source, scriptname)
|
||||
|
||||
def install_applet_script(self, scriptname):
|
||||
def install_applet_script(self, scriptname, install_name=None):
|
||||
source = self.script_applet_source_path(scriptname)
|
||||
self.install_script(source, scriptname)
|
||||
self.install_script(source, scriptname, install_name=install_name)
|
||||
|
||||
def remove_example_script(self, scriptname):
|
||||
dest = self.installed_script_path(os.path.basename(scriptname))
|
||||
|
|
Loading…
Reference in New Issue