validate:launcher: Fix launching testsuite with relative paths

This commit is contained in:
Thibault Saunier 2017-06-16 17:31:19 -04:00
parent b1b696017c
commit 335c14bf5b

View file

@ -1420,7 +1420,8 @@ class _TestsLauncher(Loggable):
def _load_testsuites(self): def _load_testsuites(self):
testsuites = [] testsuites = []
for testsuite in self.options.testsuites: for testsuite in self.options.testsuites:
if os.path.isabs(testsuite): if os.path.exists(testsuite):
testsuite = os.path.abspath(os.path.expanduser(testsuite))
loaded_module = self._load_testsuite([testsuite]) loaded_module = self._load_testsuite([testsuite])
else: else:
possible_testsuites_paths = [os.path.join(d, testsuite + ".py") possible_testsuites_paths = [os.path.join(d, testsuite + ".py")