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:
Philip Jägenstedt 2018-05-21 16:49:31 +00:00 коммит произвёл moz-wptsync-bot
Родитель b08df65e0f
Коммит 637b01af41
4 изменённых файлов: 2 добавлений и 60 удалений

Просмотреть файл

@ -399872,7 +399872,7 @@
"support"
],
"./.travis.yml": [
"0fd636bfee4cbc8a05762c8916be456f6aa4dd80",
"db79dd9531259cfaf670e7b780a9a205ec712369",
"support"
],
"./CONTRIBUTING.md": [
@ -399892,7 +399892,7 @@
"support"
],
"./check_stability.ini": [
"7f1259da298715d649ce40c2b4418e7ea812e7bd",
"5addd67f09e895336644c5a9f5049c03e1ffe615",
"support"
],
"./lint.whitelist": [

Просмотреть файл

@ -93,4 +93,3 @@ notifications:
email:
on_success: never
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
# cases.
ignore_changes: resources/**
results_url: https://pulls.web-platform-tests.org/api/stability

Просмотреть файл

@ -7,8 +7,6 @@ import subprocess
import sys
from ConfigParser import SafeConfigParser
import requests
here = os.path.dirname(__file__)
wpt_root = os.path.abspath(os.path.join(here, os.pardir, os.pardir))
sys.path.insert(0, wpt_root)
@ -178,52 +176,6 @@ def pr():
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):
if not rev:
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.install_requirements(os.path.join(wpt_root, "tools", "wptrunner", "requirements.txt"))
venv.install("requests")
args, wpt_args = get_parser().parse_known_args()
return run(venv, wpt_args, **vars(args))
@ -266,7 +217,6 @@ def run(venv, wpt_args, **kwargs):
config.readfp(config_fp)
skip_tests = config.get("file detection", "skip_tests").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:
replace_streams(kwargs["output_bytes"],
@ -281,8 +231,6 @@ def run(venv, wpt_args, **kwargs):
setup_logging()
browser_name = wpt_args.product.split(":")[0]
pr_number = pr()
with TravisFold("browser_setup"):
@ -345,10 +293,6 @@ def run(venv, wpt_args, **kwargs):
write_results(logger.info, results, iterations,
pr_number=pr_number,
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:
logger.info("No tests run.")
# Be conservative and only return errors when we know for sure tests are changed.