Bug 1108781 - Log relative paths as test identifiers in xpcshell. r=ahal

This commit is contained in:
Chris Manchester 2014-12-09 15:38:18 -05:00
parent 380ec97ec6
commit 8e1f7f43e2

View File

@ -997,7 +997,9 @@ class XPCShellTests(object):
def makeTestId(self, test_object):
"""Calculate an identifier for a test based on its path or a combination of
its path and the source manifest."""
path = test_object['path'].replace('\\', '/');
relpath_key = 'file_relpath' if 'file_relpath' in test_object else 'relpath'
path = test_object[relpath_key].replace('\\', '/');
if 'dupe-manifest' in test_object and 'ancestor-manifest' in test_object:
return '%s:%s' % (os.path.basename(test_object['ancestor-manifest']), path)
return path