mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 08:45:46 +00:00
Bug 1144573 - Cleanup after removing android*.json. r=ahal, r=jmaher
CLOSED TREE --HG-- extra : amend_source : b889bad374c39a763d218b4af7374cb848e24adf
This commit is contained in:
parent
261c1523b2
commit
7415bf9e30
@ -292,20 +292,6 @@ class MochitestOptions(optparse.OptionParser):
|
||||
"Default cap is 30 runs, which can be overwritten with the --repeat parameter.",
|
||||
"default": False,
|
||||
}],
|
||||
[["--run-only-tests"],
|
||||
{"action": "store",
|
||||
"type": "string",
|
||||
"dest": "runOnlyTests",
|
||||
"help": "JSON list of tests that we only want to run. [DEPRECATED- please use --test-manifest]",
|
||||
"default": None,
|
||||
}],
|
||||
[["--test-manifest"],
|
||||
{"action": "store",
|
||||
"type": "string",
|
||||
"dest": "testManifest",
|
||||
"help": "JSON list of tests to specify 'runtests'. Old format for mobile specific tests",
|
||||
"default": None,
|
||||
}],
|
||||
[["--manifest"],
|
||||
{"action": "store",
|
||||
"type": "string",
|
||||
@ -585,27 +571,6 @@ class MochitestOptions(optparse.OptionParser):
|
||||
self.error("%s not found, cannot automate VMware recording." %
|
||||
mochitest.vmwareHelperPath)
|
||||
|
||||
if options.testManifest and options.runOnlyTests:
|
||||
self.error(
|
||||
"Please use --test-manifest only and not --run-only-tests")
|
||||
|
||||
if options.runOnlyTests:
|
||||
if not os.path.exists(
|
||||
os.path.abspath(
|
||||
os.path.join(
|
||||
here,
|
||||
options.runOnlyTests))):
|
||||
self.error(
|
||||
"unable to find --run-only-tests file '%s'" %
|
||||
options.runOnlyTests)
|
||||
options.runOnly = True
|
||||
options.testManifest = options.runOnlyTests
|
||||
options.runOnlyTests = None
|
||||
|
||||
if options.manifestFile and options.testManifest:
|
||||
self.error(
|
||||
"Unable to support both --manifest and --test-manifest/--run-only-tests at the same time")
|
||||
|
||||
if options.webapprtContent and options.webapprtChrome:
|
||||
self.error(
|
||||
"Only one of --webapprt-content and --webapprt-chrome may be given.")
|
||||
|
@ -1880,39 +1880,11 @@ class Mochitest(MochitestUtilsMixin):
|
||||
return (t for t in tests
|
||||
if 'imptests/failures' not in t['path'])
|
||||
|
||||
# filter that implements old-style JSON manifests, remove
|
||||
# once everything is using .ini
|
||||
def apply_json_manifest(tests, values):
|
||||
m = os.path.join(SCRIPT_DIR, options.testManifest)
|
||||
with open(m, 'r') as f:
|
||||
m = json.loads(f.read())
|
||||
|
||||
runtests = m.get('runtests')
|
||||
exctests = m.get('excludetests')
|
||||
if runtests is None and exctests is None:
|
||||
if options.runOnly:
|
||||
runtests = m
|
||||
else:
|
||||
exctests = m
|
||||
|
||||
disabled = 'disabled by {}'.format(options.testManifest)
|
||||
for t in tests:
|
||||
if runtests and not any(t['relpath'].startswith(r)
|
||||
for r in runtests):
|
||||
t['disabled'] = disabled
|
||||
if exctests and any(t['relpath'].startswith(r)
|
||||
for r in exctests):
|
||||
t['disabled'] = disabled
|
||||
yield t
|
||||
|
||||
filters = [
|
||||
remove_imptest_failure_expectations,
|
||||
subsuite(options.subsuite),
|
||||
]
|
||||
|
||||
if options.testManifest:
|
||||
filters.append(apply_json_manifest)
|
||||
|
||||
# Add chunking filters if specified
|
||||
if options.chunkByDir:
|
||||
filters.append(chunk_by_dir(options.thisChunk,
|
||||
|
Loading…
Reference in New Issue
Block a user