mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
Bug 962919 - Filter a given test directory by the B2G manifest. r=ahal
This commit is contained in:
parent
df0a8cce6d
commit
629f42edf8
@ -133,16 +133,22 @@ class MochitestRunner(MozbuildObject):
|
||||
parser = B2GOptions()
|
||||
options = parser.parse_args([])[0]
|
||||
|
||||
test_path_dir = False;
|
||||
if test_path:
|
||||
test_root_file = mozpack.path.join(self.mochitest_dir, 'tests', test_path)
|
||||
if not os.path.exists(test_root_file):
|
||||
print('Specified test path does not exist: %s' % test_root_file)
|
||||
return 1
|
||||
if os.path.isdir(test_root_file):
|
||||
test_path_dir = True;
|
||||
options.testPath = test_path
|
||||
elif conditions.is_b2g_desktop(self):
|
||||
options.testManifest = 'b2g-desktop.json'
|
||||
else:
|
||||
options.testManifest = 'b2g.json'
|
||||
|
||||
# filter test directiories or all tests according to the manifest
|
||||
if not test_path or test_path_dir:
|
||||
if conditions.is_b2g_desktop(self):
|
||||
options.testManifest = 'b2g-desktop.json'
|
||||
else:
|
||||
options.testManifest = 'b2g.json'
|
||||
|
||||
for k, v in kwargs.iteritems():
|
||||
setattr(options, k, v)
|
||||
|
Loading…
Reference in New Issue
Block a user