зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1462524 [wpt PR 11060] - Stop posting PR results to pulls.web-platform-tests.org, a=testonly
Automatic update from web-platform-testsStop posting PR results to pulls.web-platform-tests.org (#11060) Resolves https://github.com/w3c/web-platform-tests/issues/10923. -- wpt-commits: 4707a955260a76af42a0af32b9547c277911a9d9 wpt-pr: 11060
This commit is contained in:
Родитель
b08df65e0f
Коммит
637b01af41
|
@ -399872,7 +399872,7 @@
|
||||||
"support"
|
"support"
|
||||||
],
|
],
|
||||||
"./.travis.yml": [
|
"./.travis.yml": [
|
||||||
"0fd636bfee4cbc8a05762c8916be456f6aa4dd80",
|
"db79dd9531259cfaf670e7b780a9a205ec712369",
|
||||||
"support"
|
"support"
|
||||||
],
|
],
|
||||||
"./CONTRIBUTING.md": [
|
"./CONTRIBUTING.md": [
|
||||||
|
@ -399892,7 +399892,7 @@
|
||||||
"support"
|
"support"
|
||||||
],
|
],
|
||||||
"./check_stability.ini": [
|
"./check_stability.ini": [
|
||||||
"7f1259da298715d649ce40c2b4418e7ea812e7bd",
|
"5addd67f09e895336644c5a9f5049c03e1ffe615",
|
||||||
"support"
|
"support"
|
||||||
],
|
],
|
||||||
"./lint.whitelist": [
|
"./lint.whitelist": [
|
||||||
|
|
|
@ -93,4 +93,3 @@ notifications:
|
||||||
email:
|
email:
|
||||||
on_success: never
|
on_success: never
|
||||||
on_failure: always
|
on_failure: always
|
||||||
webhooks: https://pulls.web-platform-tests.org/api/build
|
|
||||||
|
|
|
@ -7,4 +7,3 @@ skip_tests: conformance-checkers docs tools
|
||||||
# (particularly in terms of execution time), making it impractical in most
|
# (particularly in terms of execution time), making it impractical in most
|
||||||
# cases.
|
# cases.
|
||||||
ignore_changes: resources/**
|
ignore_changes: resources/**
|
||||||
results_url: https://pulls.web-platform-tests.org/api/stability
|
|
||||||
|
|
|
@ -7,8 +7,6 @@ import subprocess
|
||||||
import sys
|
import sys
|
||||||
from ConfigParser import SafeConfigParser
|
from ConfigParser import SafeConfigParser
|
||||||
|
|
||||||
import requests
|
|
||||||
|
|
||||||
here = os.path.dirname(__file__)
|
here = os.path.dirname(__file__)
|
||||||
wpt_root = os.path.abspath(os.path.join(here, os.pardir, os.pardir))
|
wpt_root = os.path.abspath(os.path.join(here, os.pardir, os.pardir))
|
||||||
sys.path.insert(0, wpt_root)
|
sys.path.insert(0, wpt_root)
|
||||||
|
@ -178,52 +176,6 @@ def pr():
|
||||||
return pr if pr != "false" else None
|
return pr if pr != "false" else None
|
||||||
|
|
||||||
|
|
||||||
def post_results(results, pr_number, iterations, product, url, status):
|
|
||||||
"""Post stability results to a given URL."""
|
|
||||||
payload_results = []
|
|
||||||
|
|
||||||
for test_name, test in results.iteritems():
|
|
||||||
subtests = []
|
|
||||||
for subtest_name, subtest in test['subtests'].items():
|
|
||||||
subtests.append({
|
|
||||||
'test': subtest_name,
|
|
||||||
'result': {
|
|
||||||
'messages': list(subtest['messages']),
|
|
||||||
'status': subtest['status']
|
|
||||||
},
|
|
||||||
})
|
|
||||||
payload_results.append({
|
|
||||||
'test': test_name,
|
|
||||||
'result': {
|
|
||||||
'status': test['status'],
|
|
||||||
'subtests': subtests
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
payload = {
|
|
||||||
"pull": {
|
|
||||||
"number": int(pr_number),
|
|
||||||
"sha": os.environ.get("TRAVIS_PULL_REQUEST_SHA"),
|
|
||||||
},
|
|
||||||
"job": {
|
|
||||||
"id": int(os.environ.get("TRAVIS_JOB_ID")),
|
|
||||||
"number": os.environ.get("TRAVIS_JOB_NUMBER"),
|
|
||||||
"allow_failure": os.environ.get("TRAVIS_ALLOW_FAILURE") == 'true',
|
|
||||||
"status": status,
|
|
||||||
},
|
|
||||||
"build": {
|
|
||||||
"id": int(os.environ.get("TRAVIS_BUILD_ID")),
|
|
||||||
"number": os.environ.get("TRAVIS_BUILD_NUMBER"),
|
|
||||||
},
|
|
||||||
"product": product,
|
|
||||||
"iterations": iterations,
|
|
||||||
"message": "All results were stable." if status == "passed" else "Unstable results.",
|
|
||||||
"results": payload_results,
|
|
||||||
}
|
|
||||||
|
|
||||||
requests.post(url, json=payload)
|
|
||||||
|
|
||||||
|
|
||||||
def get_changed_files(manifest_path, rev, ignore_changes, skip_tests):
|
def get_changed_files(manifest_path, rev, ignore_changes, skip_tests):
|
||||||
if not rev:
|
if not rev:
|
||||||
branch_point = testfiles.branch_point()
|
branch_point = testfiles.branch_point()
|
||||||
|
@ -248,7 +200,6 @@ def main():
|
||||||
|
|
||||||
venv = Virtualenv(os.environ.get("VIRTUAL_ENV", os.path.join(wpt_root, "_venv")))
|
venv = Virtualenv(os.environ.get("VIRTUAL_ENV", os.path.join(wpt_root, "_venv")))
|
||||||
venv.install_requirements(os.path.join(wpt_root, "tools", "wptrunner", "requirements.txt"))
|
venv.install_requirements(os.path.join(wpt_root, "tools", "wptrunner", "requirements.txt"))
|
||||||
venv.install("requests")
|
|
||||||
|
|
||||||
args, wpt_args = get_parser().parse_known_args()
|
args, wpt_args = get_parser().parse_known_args()
|
||||||
return run(venv, wpt_args, **vars(args))
|
return run(venv, wpt_args, **vars(args))
|
||||||
|
@ -266,7 +217,6 @@ def run(venv, wpt_args, **kwargs):
|
||||||
config.readfp(config_fp)
|
config.readfp(config_fp)
|
||||||
skip_tests = config.get("file detection", "skip_tests").split()
|
skip_tests = config.get("file detection", "skip_tests").split()
|
||||||
ignore_changes = set(config.get("file detection", "ignore_changes").split())
|
ignore_changes = set(config.get("file detection", "ignore_changes").split())
|
||||||
results_url = config.get("file detection", "results_url")
|
|
||||||
|
|
||||||
if kwargs["output_bytes"] is not None:
|
if kwargs["output_bytes"] is not None:
|
||||||
replace_streams(kwargs["output_bytes"],
|
replace_streams(kwargs["output_bytes"],
|
||||||
|
@ -281,8 +231,6 @@ def run(venv, wpt_args, **kwargs):
|
||||||
|
|
||||||
setup_logging()
|
setup_logging()
|
||||||
|
|
||||||
browser_name = wpt_args.product.split(":")[0]
|
|
||||||
|
|
||||||
pr_number = pr()
|
pr_number = pr()
|
||||||
|
|
||||||
with TravisFold("browser_setup"):
|
with TravisFold("browser_setup"):
|
||||||
|
@ -345,10 +293,6 @@ def run(venv, wpt_args, **kwargs):
|
||||||
write_results(logger.info, results, iterations,
|
write_results(logger.info, results, iterations,
|
||||||
pr_number=pr_number,
|
pr_number=pr_number,
|
||||||
use_details=True)
|
use_details=True)
|
||||||
if pr_number:
|
|
||||||
post_results(results, iterations=iterations, url=results_url,
|
|
||||||
product=wpt_args.product, pr_number=pr_number,
|
|
||||||
status="failed" if inconsistent else "passed")
|
|
||||||
else:
|
else:
|
||||||
logger.info("No tests run.")
|
logger.info("No tests run.")
|
||||||
# Be conservative and only return errors when we know for sure tests are changed.
|
# Be conservative and only return errors when we know for sure tests are changed.
|
||||||
|
|
Загрузка…
Ссылка в новой задаче