test: Import some mochitests from firefox, b=no-bug, c=tests, scripts, tabs

This commit is contained in:
mr. m
2025-10-21 16:03:13 +02:00
parent fbad844a08
commit 1d509e30a9
214 changed files with 28247 additions and 1 deletions

View File

@@ -15,6 +15,7 @@ IGNORE_PREFS_FILE_OUT = os.path.join(
'engine', 'testing', 'mochitest', 'ignorePrefs.json'
)
MOCHITEST_NAME = "mochitests"
class JSONWithCommentsDecoder(json.JSONDecoder):
def __init__(self, **kw):
@@ -68,7 +69,9 @@ def main():
os.execvp(command[0], command)
if path in ("", "all"):
test_dirs = [p for p in Path("zen/tests").iterdir() if p.is_dir()]
test_dirs = [p for p in Path("zen/tests").iterdir() if p.is_dir() and p.name != MOCHITEST_NAME]
mochitest_dirs = [p for p in Path(f"zen/tests/{MOCHITEST_NAME}").iterdir() if p.is_dir()]
test_dirs.extend(mochitest_dirs)
test_paths = [str(p) for p in test_dirs]
run_mach_with_paths(test_paths)
else: