mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 914327 - Mach command for b2g mochitests should handle test_path better, r=jgriffin, DONTBUILD, a=NPOTB
This commit is contained in:
parent
06c33720be
commit
2734959955
@ -65,6 +65,11 @@ class MochitestRunner(MozbuildObject):
|
||||
# TODO Find adb automatically if it isn't on the path
|
||||
raise Exception(ADB_NOT_FOUND % ('mochitest-remote', b2g_home))
|
||||
|
||||
# Need to call relpath before os.chdir() below.
|
||||
test_path = ''
|
||||
if test_file:
|
||||
test_path = self._wrap_path_argument(test_file).relpath()
|
||||
|
||||
# TODO without os.chdir, chained imports fail below
|
||||
os.chdir(self.mochitest_dir)
|
||||
|
||||
@ -86,8 +91,12 @@ class MochitestRunner(MozbuildObject):
|
||||
options.httpdPath = self.mochitest_dir
|
||||
options.xrePath = xre_path
|
||||
|
||||
if test_file:
|
||||
options.testPath = test_file
|
||||
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
|
||||
options.testPath = test_path
|
||||
else:
|
||||
options.testManifest = 'b2g.json'
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user