Created
June 8, 2020 21:49
-
-
Save incfly/8e79f86efd3fc2989e7c0cda3f36796c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import urllib.request | |
# url = | |
# 'https://storage.googleapis.com/istio-prow/logs/integ-distroless-k8s-tests_istio_postsubmit/1418/build-log.txt'submit/1418/build-log.txt' | |
def download_url(run: int, suite='integ-distroless-k8s-tests_istio_postsubmit'): | |
return f'https://storage.googleapis.com/istio-prow/logs/{suite}/{run}/build-log.txt' | |
def check_tests(start, end: int, | |
suite='integ-distroless-k8s-tests_istio_postsubmit'): | |
for i in range(start, end): | |
if i % 50 == 0: | |
print(f'test checking progress, {i}') | |
url = download_url(i, suite=suite) | |
try: | |
f = urllib.request.urlopen(url) | |
result = '' | |
for l in f.readlines(): | |
if 'expected failed' in str(l): | |
result += '\n' + str(l) | |
if result != '': | |
print(f'Checking suite {suite}, run {i}\n{result}') | |
except urllib.error.URLError as e: | |
print(f'fail to send request to {suite}, run {i}\n') | |
# check_tests(1100, 1400) | |
check_tests(1100, 1400, suite='integ-security-k8s-tests_istio_postsubmit') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
normal test suite runs
test checking progress, 1100
fail to send request to integ-security-k8s-tests_istio_postsubmit, run 1121
test checking progress, 1150
test checking progress, 1200
test checking progress, 1250
test checking progress, 1300
test checking progress, 1350