From d33e5ea0125b5b9c1289d48c5dfb62a3c88c99d2 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Tue, 5 Feb 2019 13:24:57 +1100 Subject: [PATCH] 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. --- Tools/autotest/common.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Tools/autotest/common.py b/Tools/autotest/common.py index 88b576c4b4..b803beafde 100644 --- a/Tools/autotest/common.py +++ b/Tools/autotest/common.py @@ -573,7 +573,12 @@ class AutoTest(ABC): save_count = self.mavproxy.match.group(1) if save_count != request_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() self.assert_mission_files_same(path, saved_filepath) break