mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-09 15:27:55 -04:00
Check test results from gateway server
This commit is contained in:
parent
a948f765f3
commit
7fa5a8696a
@ -10,10 +10,11 @@ sys.stdout.flush()
|
|||||||
|
|
||||||
runID = os.environ['TRAVIS_BUILD_NUMBER']
|
runID = os.environ['TRAVIS_BUILD_NUMBER']
|
||||||
apiKey = os.environ['BITBAR_API_KEY']
|
apiKey = os.environ['BITBAR_API_KEY']
|
||||||
|
resultsUrl = os.environ['TESTDROID_RUNNER_RESULTS']
|
||||||
testName = "Auto Test {}".format(runID)
|
testName = "Auto Test {}".format(runID)
|
||||||
|
|
||||||
for x in range(0, 200):
|
for x in range(0, 200):
|
||||||
r = requests.get('https://cloud.testdroid.com/api/me/projects/{}/runs'.format(PROJECT_ID), auth=(apiKey, ''), headers={"Accept" : "application/json"})
|
r = requests.get(resultsUrl)
|
||||||
result = list(filter(lambda run: run.get("displayName") == testName, r.json().get("data")))
|
result = list(filter(lambda run: run.get("displayName") == testName, r.json().get("data")))
|
||||||
if len(result) > 0 and result[0].get("state") == "FINISHED":
|
if len(result) > 0 and result[0].get("state") == "FINISHED":
|
||||||
ratio = result[0].get("successRatio")
|
ratio = result[0].get("successRatio")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user