mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 932186 - Allow mach to specify a manifest file as a test path. r=ted
This commit is contained in:
parent
386e32e390
commit
185642e733
@ -314,7 +314,15 @@ class MochitestRunner(MozbuildObject):
|
||||
print('You may need to run |mach build| to build the test files.')
|
||||
return 1
|
||||
|
||||
options.testPath = test_path
|
||||
# Handle test_path pointing at a manifest file so conditions in
|
||||
# the manifest are processed. This is a temporary solution
|
||||
# pending bug 938019.
|
||||
# The manifest basename is the same as |suite|, except for plain
|
||||
manifest_base = 'mochitest' if suite == 'plain' else suite
|
||||
if os.path.basename(test_root_file) == manifest_base + '.ini':
|
||||
options.manifestFile = test_root_file
|
||||
else:
|
||||
options.testPath = test_path
|
||||
|
||||
if rerun_failures:
|
||||
options.testManifest = failure_file_path
|
||||
|
@ -360,9 +360,12 @@ class MochitestUtilsMixin(object):
|
||||
manifest.read(options.manifestFile)
|
||||
# Bug 883858 - return all tests including disabled tests
|
||||
tests = manifest.active_tests(disabled=True, **mozinfo.info)
|
||||
# We need to ensure we match on a complete directory name matching the
|
||||
# test root, and not a substring somewhere else in the path.
|
||||
test_root = os.path.sep + self.getTestRoot(options) + os.path.sep
|
||||
paths = []
|
||||
for test in tests:
|
||||
tp = test['path'].split(self.getTestRoot(options), 1)[1].strip('/')
|
||||
tp = test['path'].split(test_root, 1)[1].replace('\\', '/').strip('/')
|
||||
|
||||
# Filter out tests if we are using --test-path
|
||||
if options.testPath and not tp.startswith(options.testPath):
|
||||
|
Loading…
Reference in New Issue
Block a user