diff options
Diffstat (limited to 'testing/mozharness/scripts/web_platform_tests.py')
-rwxr-xr-x | testing/mozharness/scripts/web_platform_tests.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/testing/mozharness/scripts/web_platform_tests.py b/testing/mozharness/scripts/web_platform_tests.py index 4ce679f62d..5af71ad7ad 100755 --- a/testing/mozharness/scripts/web_platform_tests.py +++ b/testing/mozharness/scripts/web_platform_tests.py @@ -513,7 +513,16 @@ class WebPlatformTest(TestingMixin, MercurialScript, CodeCoverageMixin, AndroidM for tag in c["exclude_tag"]: cmd.append(f"--exclude-tag={tag}") - cmd.extend(test_paths) + if mozinfo.info["os"] == "win": + # Because of a limit on the length of CLI command line string length in Windows, we + # should prefer to pass paths by a file instead. + import tempfile + + with tempfile.NamedTemporaryFile(delete=False) as tmp: + tmp.write("\n".join(test_paths).encode()) + cmd.append(f"--include-file={tmp.name}") + else: + cmd.extend(test_paths) return cmd |