Tools: autotest: look for mavproxy files in cwd

While correct if you run autotest.py from the root of an ArduPilot git
repo, this is generally not correct.  The autotest server does not have
such a cwd; it runs it from one-directory-up.
This commit is contained in:
Peter Barker 2019-02-05 13:24:57 +11:00 committed by Peter Barker
parent 17e4981785
commit d33e5ea012
1 changed files with 6 additions and 1 deletions

View File

@ -573,7 +573,12 @@ class AutoTest(ABC):
save_count = self.mavproxy.match.group(1) save_count = self.mavproxy.match.group(1)
if save_count != request_count: if save_count != request_count:
raise NotAchievedException("request count != load count") raise NotAchievedException("request count != load count")
saved_filepath = util.reltopdir(self.mavproxy.match.group(2)) # warning: this assumes MAVProxy was started in the CWD!
# on the autotest server we invoke autotest.py one-up from
# the git root, like this:
# timelimit 32000 APM/Tools/autotest/autotest.py --timeout=30000 > buildlogs/autotest-output.txt 2>&1
# that means the MAVProxy log files are not reltopdir!
saved_filepath = self.mavproxy.match.group(2)
saved_filepath = saved_filepath.rstrip() saved_filepath = saved_filepath.rstrip()
self.assert_mission_files_same(path, saved_filepath) self.assert_mission_files_same(path, saved_filepath)
break break