зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1673078 [wpt PR 26267] - Make Azure Pipelines green again, a=testonly
Automatic update from web-platform-tests Use sys.executable instead of "python" when invoking a Python subprocess from a test to make sure venv is honoured in the subprocess (especially on Windows where PATH is more finicky). Potentially relevant: https://bugs.python.org/issue38905 -- Explicitly set the default branch in tests to avoid relying on the default config of git -- Stop using Headless Chrome to run tools/wpt tests On Windows, using Headless Chrome is suspected to cause ChromeDriver (and potentially Chrome) to repeatedly crash (see https://github.com/web-platform-tests/wpt/issues/26131#issuecomment-715584610). It's unclear what the root cause is yet, but disabling Headless mode is closer to our real test setup anyway. On Linux, this requires X (or Xvfb). We already enabled Xvfb for tools/ integration tests on Taskcluster, but forgot to pass the DISPLAY env var into tox. This change fixes that as well. -- Mark click_iframe_crossorigin.sub.html.ini as flaky on macOS -- wpt-commits: 8cede6f45c078d87c4642b7c9ac202f5548dc284, e4346bb55a6070106fbc0d1522316b7e79d0154f, fa0d2c411b5470b9815a8696d7e49f6685fffb91, 4628d18de8c967a6b0b63dba8278478beb391472 wpt-pr: 26267
This commit is contained in:
Родитель
52322f948f
Коммит
9d2c15685d
|
@ -0,0 +1,4 @@
|
|||
[click_iframe_crossorigin.sub.html]
|
||||
[TestDriver click on a document in an iframe]
|
||||
expected:
|
||||
if os == "mac" and product == "chrome": [PASS, FAIL] # https://github.com/web-platform-tests/wpt/issues/26295
|
|
@ -10,6 +10,7 @@ import os
|
|||
import shutil
|
||||
import stat
|
||||
import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
import threading
|
||||
|
||||
|
@ -171,6 +172,11 @@ def temp_repo():
|
|||
|
||||
try:
|
||||
subprocess.check_call(['git', 'init'], cwd=directory)
|
||||
# Explicitly create the default branch.
|
||||
subprocess.check_call(
|
||||
['git', 'checkout', '-b', 'master'],
|
||||
cwd=directory
|
||||
)
|
||||
subprocess.check_call(
|
||||
['git', 'config', 'user.name', 'example'],
|
||||
cwd=directory
|
||||
|
@ -220,7 +226,7 @@ def synchronize(expected_traffic, refs={}):
|
|||
|
||||
child = subprocess.Popen(
|
||||
[
|
||||
'python',
|
||||
sys.executable,
|
||||
subject,
|
||||
'--host',
|
||||
'http://{}:{}'.format(test_host, test_port),
|
||||
|
@ -267,7 +273,7 @@ def detect(event, expected_github_traffic, expected_preview_traffic):
|
|||
|
||||
child = subprocess.Popen(
|
||||
[
|
||||
'python',
|
||||
sys.executable,
|
||||
subject,
|
||||
'--host',
|
||||
'http://{}:{}'.format(test_host, github_port),
|
||||
|
|
|
@ -170,15 +170,14 @@ def test_run_zero_tests():
|
|||
pytest.skip("port 8000 already in use")
|
||||
|
||||
with pytest.raises(SystemExit) as excinfo:
|
||||
wpt.main(argv=["run", "--yes", "--no-pause", "--binary-arg", "headless",
|
||||
"--channel", "dev", "chrome",
|
||||
"/non-existent-dir/non-existent-file.html"])
|
||||
wpt.main(argv=["run", "--yes", "--no-pause", "--channel", "dev",
|
||||
"chrome", "/non-existent-dir/non-existent-file.html"])
|
||||
assert excinfo.value.code != 0
|
||||
|
||||
with pytest.raises(SystemExit) as excinfo:
|
||||
wpt.main(argv=["run", "--yes", "--no-pause", "--binary-arg", "headless",
|
||||
"--no-fail-on-unexpected", "--channel", "dev",
|
||||
"chrome", "/non-existent-dir/non-existent-file.html"])
|
||||
wpt.main(argv=["run", "--yes", "--no-pause", "--no-fail-on-unexpected",
|
||||
"--channel", "dev", "chrome",
|
||||
"/non-existent-dir/non-existent-file.html"])
|
||||
assert excinfo.value.code != 0
|
||||
|
||||
|
||||
|
@ -196,14 +195,13 @@ def test_run_failing_test():
|
|||
assert os.path.isfile("../../%s" % failing_test)
|
||||
|
||||
with pytest.raises(SystemExit) as excinfo:
|
||||
wpt.main(argv=["run", "--yes", "--no-pause", "--binary-arg", "headless",
|
||||
"--channel", "dev", "chrome", failing_test])
|
||||
wpt.main(argv=["run", "--yes", "--no-pause", "--channel", "dev",
|
||||
"chrome", failing_test])
|
||||
assert excinfo.value.code != 0
|
||||
|
||||
with pytest.raises(SystemExit) as excinfo:
|
||||
wpt.main(argv=["run", "--yes", "--no-pause", "--binary-arg", "headless",
|
||||
"--no-fail-on-unexpected", "--channel", "dev",
|
||||
"chrome", failing_test])
|
||||
wpt.main(argv=["run", "--yes", "--no-pause", "--no-fail-on-unexpected",
|
||||
"--channel", "dev", "chrome", failing_test])
|
||||
assert excinfo.value.code == 0
|
||||
|
||||
|
||||
|
@ -227,15 +225,15 @@ def test_run_verify_unstable(temp_test):
|
|||
""")
|
||||
|
||||
with pytest.raises(SystemExit) as excinfo:
|
||||
wpt.main(argv=["run", "--yes", "--verify", "--binary-arg", "headless",
|
||||
"--channel", "dev", "chrome", unstable_test])
|
||||
wpt.main(argv=["run", "--yes", "--verify", "--channel", "dev",
|
||||
"chrome", unstable_test])
|
||||
assert excinfo.value.code != 0
|
||||
|
||||
stable_test = temp_test("test(function() {}, 'my test');")
|
||||
|
||||
with pytest.raises(SystemExit) as excinfo:
|
||||
wpt.main(argv=["run", "--yes", "--verify", "--binary-arg", "headless",
|
||||
"--channel", "dev", "chrome", stable_test])
|
||||
wpt.main(argv=["run", "--yes", "--verify", "--channel", "dev",
|
||||
"chrome", stable_test])
|
||||
assert excinfo.value.code == 0
|
||||
|
||||
|
||||
|
|
|
@ -18,4 +18,5 @@ commands =
|
|||
pytest {posargs}
|
||||
|
||||
passenv =
|
||||
DISPLAY
|
||||
TASKCLUSTER_ROOT_URL
|
||||
|
|
Загрузка…
Ссылка в новой задаче