mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-22 00:28:30 -04:00
Tools: autotest: fail convertgpx if zip or gpsbabel fail
This commit is contained in:
parent
6652dd73e4
commit
5aa8890e5b
@ -137,14 +137,21 @@ def build_parameters():
|
||||
def convert_gpx():
|
||||
"""Convert any tlog files to GPX and KML."""
|
||||
mavlog = glob.glob(buildlogs_path("*.tlog"))
|
||||
passed = True
|
||||
for m in mavlog:
|
||||
util.run_cmd(util.reltopdir("modules/mavlink/pymavlink/tools/mavtogpx.py") + " --nofixcheck " + m)
|
||||
gpx = m + '.gpx'
|
||||
kml = m + '.kml'
|
||||
util.run_cmd('gpsbabel -i gpx -f %s -o kml,units=m,floating=1,extrude=1 -F %s' % (gpx, kml), checkfail=False)
|
||||
util.run_cmd('zip %s.kmz %s.kml' % (m, m), checkfail=False)
|
||||
try:
|
||||
util.run_cmd('gpsbabel -i gpx -f %s -o kml,units=m,floating=1,extrude=1 -F %s' % (gpx, kml))
|
||||
except CalledProcessError as e:
|
||||
passed = False
|
||||
try:
|
||||
util.run_cmd('zip %s.kmz %s.kml' % (m, m))
|
||||
except CalledProcessError as e:
|
||||
passed = False
|
||||
util.run_cmd("mavflightview.py --imagefile=%s.png %s" % (m, m))
|
||||
return True
|
||||
return passed
|
||||
|
||||
|
||||
def test_prerequisites():
|
||||
|
Loading…
Reference in New Issue
Block a user