Skip to content

Instantly share code, notes, and snippets.

@simon-mo
Created January 11, 2022 18:09
Show Gist options
  • Select an option

  • Save simon-mo/dd93588d3f261637d47e23e629eaa27b to your computer and use it in GitHub Desktop.

Select an option

Save simon-mo/dd93588d3f261637d47e23e629eaa27b to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="UTF-8"?>
<testsuites>
<testsuite name="python/ray/serve/test_config" tests="1" failures="0" errors="0">
<testcase name="python/ray/serve/test_config" status="run" duration="1" time="1"></testcase>
<system-out>
Generated test.log (if the file is not UTF-8, then this may be unreadable):
<![CDATA[exec ${PAGER:-/usr/bin/less} "$0" || exit 1
Executing tests from //python/ray/serve:test_config
-----------------------------------------------------------------------------
============================= test session starts ==============================
platform darwin -- Python 3.6.9, pytest-5.3.5, py-1.10.0, pluggy-0.13.1 -- /Users/simonmo/miniconda3/bin/python3
cachedir: .pytest_cache
benchmark: 3.2.2 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
rootdir: /private/var/tmp/_bazel_simonmo/035a08685e8ba6a30cff262a6a6c5dd2/execroot/com_github_ray_project_ray/bazel-out/darwin-opt/bin/python/ray/serve/test_config.runfiles/com_github_ray_project_ray
plugins: sugar-0.9.2, rerunfailures-9.1.1, asyncio-0.10.0, custom-exit-code-0.3.0, benchmark-3.2.2, anyio-3.3.4, aiohttp-0.3.0, timeout-1.4.2, lazy-fixture-0.6.3, cov-2.8.1
collecting ... collected 7 items
::test_autoscaling_config_validation PASSED
::test_deployment_config_validation PASSED
::test_deployment_config_update PASSED
::test_replica_config_validation PASSED
::test_http_options PASSED
::test_with_proto PASSED
::test_zero_default_proto PASSED
=============================== warnings summary ===============================
/Users/simonmo/miniconda3/lib/python3.6/site-packages/_pytest/config/__init__.py:891
/Users/simonmo/miniconda3/lib/python3.6/site-packages/_pytest/config/__init__.py:891: PytestAssertRewriteWarning: Module already imported so cannot be rewritten: anyio
self._mark_plugins_for_rewrite(hook)
-- Docs: https://docs.pytest.org/en/latest/warnings.html
========================= 7 passed, 1 warning in 0.03s =========================]]>
</system-out>
</testsuite>
</testsuites>
import requests
import json
import time
import os
token = os.environ["AUTH_TOKEN"]
data = open("test.xml").read()
resp = requests.post(
"https://analytics-api.buildkite.com/v1/uploads",
headers={"Authorization": f'Token token="{token}"'},
json={
"format": "junit",
"run_env": {
"CI": "buildkite",
"key": str(int(time.time())),
"job_id": "002",
"branch": "master",
"commit_sha": "f16b422062e75f63c8fc8651f85972aa0b5564ab",
"message": "Test Analytics Run",
"url": "https://buildkite.com/ray-project/ray-builders-branch/builds/5413"
},
"data": data
})
print(resp.status_code)
print(resp.text)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment