summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2025-03-05 10:12:25 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-03-05 10:29:02 +0000
commit3e61f40f36d2aebcef0eaa0e64361c60bb561f46 (patch)
tree025acace7df8e96a208238c54c1da675459918d8 /bitbake
parent08c435c1bc2c79137a0c221bec626b93a1e3332a (diff)
downloadpoky-3e61f40f36d2aebcef0eaa0e64361c60bb561f46.tar.gz
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>
Diffstat (limited to 'bitbake')
-rwxr-xr-xbitbake/lib/toaster/orm/fixtures/check_fixtures.py38
1 files changed, 38 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/orm/fixtures/check_fixtures.py b/bitbake/lib/toaster/orm/fixtures/check_fixtures.py
new file mode 100755
index 0000000000..ae3722e0f6
--- /dev/null
+++ b/bitbake/lib/toaster/orm/fixtures/check_fixtures.py
@@ -0,0 +1,38 @@
1#!/usr/bin/env python3
2#
3# Copyright (C) 2025 Linux Foundation
4# SPDX-License-Identifier: GPL-2.0-only
5#
6
7import json
8import urllib.request
9
10import gen_fixtures as fixtures
11
12RELEASE_URL = "https://dashboard.yoctoproject.org/releases.json"
13
14with urllib.request.urlopen(RELEASE_URL) as response:
15 if response.getcode() == 200:
16 data = response.read().decode("utf-8")
17 releases = json.loads(data)
18 else:
19 print("Couldn't access %s: %s" % (RELEASE_URL, reponse.getcode()))
20 exit(1)
21
22
23# grab the recent release branches and add master, so we can ignore old branches
24active_releases = [
25 e["release_codename"].lower() for e in releases if e["series"] == "current"
26]
27active_releases.append("master")
28active_releases.append("head")
29
30fixtures_releases = [x[0].lower() for x in fixtures.current_releases]
31
32if set(active_releases) != set(fixtures_releases):
33 print("WARNING: Active releases don't match toaster configured releases, the difference is: %s" % set(active_releases).difference(set(fixtures_releases)))
34 print("Active releases: %s" % sorted(active_releases))
35 print("Toaster configured releases: %s" % sorted(fixtures_releases))
36else:
37 print("Success, configuration matches")
38