Last active
February 17, 2021 09:33
-
-
Save iainlane/346718134a2f6fa2624d9373e07fe623 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 lzma | |
import urllib.request | |
import yaml | |
SERIES = "hirsute" | |
URL = "https://people.canonical.com/~ubuntu-archive/proposed-migration/update_excuses.yaml.xz" | |
with lzma.LZMAFile(urllib.request.urlopen(URL)) as resp: | |
y = yaml.load(resp, Loader=yaml.CSafeLoader) | |
for source in y["sources"]: | |
try: | |
if source["policy_info"]["age"]["current-age"] < 5: | |
continue | |
tests = source["policy_info"]["autopkgtest"] | |
for test in tests: | |
if test == "verdict": | |
continue | |
for arch in tests[test]: | |
if tests[test][arch][0] in ( | |
"RUNNING", | |
"RUNNING-ALWAYSFAIL", | |
): | |
print(f"run-autopkgtest -s {SERIES} -a {arch} --trigger={source['item-name']}/{source['new-version']} {test.split('/')[0]}") | |
except KeyError: | |
continue |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment