Bug 1296735 - [manifestparser] pathprefix filter should use absolute paths if the filter is also absolute, r?jmaher
This fixes an error when attempting to run xpcshell-test with a test path from an interactive loaner.
MozReview-Commit-ID: 20kg5zKplhT
--- a/testing/mozbase/manifestparser/manifestparser/filters.py
+++ b/testing/mozbase/manifestparser/manifestparser/filters.py
@@ -351,17 +351,22 @@ class pathprefix(InstanceFilter):
if isinstance(paths, basestring):
paths = [paths]
self.paths = paths
def __call__(self, tests, values):
for test in tests:
for tp in self.paths:
tp = os.path.normpath(tp)
- if not os.path.normpath(test['relpath']).startswith(tp):
+
+ path = test['relpath']
+ if os.path.isabs(tp):
+ path = test['path']
+
+ if not os.path.normpath(path).startswith(tp):
continue
# any test path that points to a single file will be run no
# matter what, even if it's disabled
if 'disabled' in test and os.path.normpath(test['relpath']) == tp:
del test['disabled']
yield test
break