From 77b3f5251cd1af747ad45739af7f9398ae1f881e Mon Sep 17 00:00:00 2001 From: Nathan Froyd Date: Thu, 21 Aug 2014 11:03:26 -0400 Subject: [PATCH] Bug 1056862 - make |mach python-test| work even if run from outside the srcdir; r=gps DONTBUILD because NPOTB --- python/mach_commands.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python/mach_commands.py b/python/mach_commands.py index 65f8d21903108..e30753924475e 100644 --- a/python/mach_commands.py +++ b/python/mach_commands.py @@ -63,7 +63,7 @@ def python_test(self, tests, verbose=False, stop=False): # which produces output in the format Mozilla infrastructure expects. return_code = 0 files = [] - for test in tests: + for test in [mozpack.path.join(self.topsrcdir, t) for t in tests]: if test.endswith('.py') and os.path.isfile(test): files.append(test) elif os.path.isfile(test + '.py'): @@ -72,7 +72,8 @@ def python_test(self, tests, verbose=False, stop=False): files += glob.glob(mozpack.path.join(test, 'test*.py')) files += glob.glob(mozpack.path.join(test, 'unit*.py')) else: - self.log(logging.WARN, 'python-test', {'test': test}, + self.log(logging.WARN, 'python-test', + {'test': mozpack.path.relpath(test, self.topsrcdir)}, 'TEST-UNEXPECTED-FAIL | Invalid test: {test}') if stop: return 1