mirror of
https://github.com/servo/servo.git
synced 2025-07-19 05:13:55 +01:00
tests: Force a blank config directory for each WPT test run. (#38078)
This ensures a consistent state when running tests that can otherwise leave artifacts around (eg. localStorage/IndexedDB/cookies). Testing: Existing test coverage is sufficient. Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
parent
aa098ba2a3
commit
0e3165da01
1 changed files with 6 additions and 1 deletions
|
@ -9,6 +9,7 @@ import multiprocessing
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
|
import tempfile
|
||||||
import urllib.error
|
import urllib.error
|
||||||
import urllib.parse
|
import urllib.parse
|
||||||
import urllib.request
|
import urllib.request
|
||||||
|
@ -117,7 +118,11 @@ def run_tests(default_binary_path: str, **kwargs) -> int:
|
||||||
handler = ServoHandler(detect_flakes=kwargs["retry_unexpected"] >= 1)
|
handler = ServoHandler(detect_flakes=kwargs["retry_unexpected"] >= 1)
|
||||||
logger.add_handler(handler)
|
logger.add_handler(handler)
|
||||||
|
|
||||||
|
with tempfile.TemporaryDirectory(prefix="servo-") as config_dir:
|
||||||
|
kwargs["binary_args"] += ["--config-dir", config_dir]
|
||||||
|
|
||||||
wptrunner.run_tests(**kwargs)
|
wptrunner.run_tests(**kwargs)
|
||||||
|
|
||||||
return_value = int(handler.any_stable_unexpected())
|
return_value = int(handler.any_stable_unexpected())
|
||||||
|
|
||||||
# Filter intermittents if that was specified on the command-line.
|
# Filter intermittents if that was specified on the command-line.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue