mirror of
https://git.yoctoproject.org/poky
synced 2026-05-08 17:19:20 +00:00
bitbake: toaster: Add script to compare toaster fixtures to project release data
We need to validate the toaster fixtures information against our current release data to ensure it is correct when we release. Add a script we can use to do this which the autobuilder can run to validate things. [YOCTO #15516] (Bitbake rev: 5b2d79ed505bbfa2fb2d355935e75199b7f2c37e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
+38
@@ -0,0 +1,38 @@
|
||||
#!/usr/bin/env python3
|
||||
#
|
||||
# Copyright (C) 2025 Linux Foundation
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
|
||||
import json
|
||||
import urllib.request
|
||||
|
||||
import gen_fixtures as fixtures
|
||||
|
||||
RELEASE_URL = "https://dashboard.yoctoproject.org/releases.json"
|
||||
|
||||
with urllib.request.urlopen(RELEASE_URL) as response:
|
||||
if response.getcode() == 200:
|
||||
data = response.read().decode("utf-8")
|
||||
releases = json.loads(data)
|
||||
else:
|
||||
print("Couldn't access %s: %s" % (RELEASE_URL, reponse.getcode()))
|
||||
exit(1)
|
||||
|
||||
|
||||
# grab the recent release branches and add master, so we can ignore old branches
|
||||
active_releases = [
|
||||
e["release_codename"].lower() for e in releases if e["series"] == "current"
|
||||
]
|
||||
active_releases.append("master")
|
||||
active_releases.append("head")
|
||||
|
||||
fixtures_releases = [x[0].lower() for x in fixtures.current_releases]
|
||||
|
||||
if set(active_releases) != set(fixtures_releases):
|
||||
print("WARNING: Active releases don't match toaster configured releases, the difference is: %s" % set(active_releases).difference(set(fixtures_releases)))
|
||||
print("Active releases: %s" % sorted(active_releases))
|
||||
print("Toaster configured releases: %s" % sorted(fixtures_releases))
|
||||
else:
|
||||
print("Success, configuration matches")
|
||||
|
||||
Reference in New Issue
Block a user