From patchwork Thu Jun 11 22:57:56 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Reyna, David" X-Patchwork-Id: 89896 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 59DF7CD98CC for ; Thu, 11 Jun 2026 22:58:07 +0000 (UTC) Received: from mx0b-0064b401.pphosted.com (mx0b-0064b401.pphosted.com [205.220.178.238]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.59085.1781218681544064442 for ; Thu, 11 Jun 2026 15:58:01 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@windriver.com header.s=PPS06212021 header.b=iSI+d9vP; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: windriver.com, ip: 205.220.178.238, mailfrom: prvs=06224ea6e2=david.reyna@windriver.com) Received: from pps.filterd (m0250812.ppops.net [127.0.0.1]) by mx0a-0064b401.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65BMWxHx048883 for ; Thu, 11 Jun 2026 22:58:00 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=windriver.com; h=content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=PPS06212021; bh=ZQcuJrSQoOc/vJi80Dhf EKbWR9/bwyjF1KpGnj45MRU=; b=iSI+d9vPLIfulGvDh5Qp8DoR5HWYMqZG45LS v3dhOCQpt730Ig2iojrBltEo4tyzYYHgv4oniInrHUDelk2xnaYqoz9N5Cxk2N/B YzHTQj7p9TEPDFN3rx6exVinO2NffAlBN0j7eW7+ljbJfjDQnBNueubCukcKhTee SV6uoTUVM4MTP9NpNnesVpXHM0JJSadB+p2vSbpacYT9AxyBZHuKzQsNCOpTeQub d9QBsLfqBrcBtJxcORSbzQPiRNVogKsXnxET7goLXkqIo0WyvV0E/CMZQORmPaTm YrPyE8MjhYrJDMjT1MfuWlB8za5kht1Qp8H7J8d8QcAw3rbGCQ== Received: from sn4pr2101cu001.outbound.protection.outlook.com (mail-southcentralusazon11012054.outbound.protection.outlook.com [40.93.195.54]) by mx0a-0064b401.pphosted.com (PPS) with ESMTPS id 4eqe7ehy85-1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT) for ; Thu, 11 Jun 2026 22:58:00 +0000 (GMT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=qzOO81iLfmOMmgpnXSpyiONxiWcl/nonD6vKIAn0pWTpz3ah8n1VRFYfm5dVtcJyj8yEnE06lfUO1wH1D8V2QVsdkAbIFxIeG8iNfCZ6TNe+w6T5++gZGI9tt2EF87dl7QstWvuzu0GH0VN0tmYip5KvZUALQMlystfAWmEtf6msP/CC5nk2ZYNXzqjihtA7aHwj2YmRb065InsQgqgiG1oytTRMxr6ARQwRpjwLYuN+WO6MbJVEqpTiJjCGK0ZsreVJdbrITRiODoYu/80TScnOs+VlO17/NRkiazOea33YwxGE4nC/9mWmDTLGoti8bA/UpZ5RSgXXV39P6mf31w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ZQcuJrSQoOc/vJi80DhfEKbWR9/bwyjF1KpGnj45MRU=; b=RSTsZHM+eV8h8lTOSV8enJwiX/2dm7yhV7/08Ov6sN2moNcp+gJ6wFDrI1WDffJSn5OoEpxDRe8cPGDNX8TvJ/GsY9yerJ4GIi6yKd/IIOZ/VR+3/i3r+eURa3NE1kRiV2zLsx/SL1aHdRMVjHKnoTPuBPpQ9mNSdiNG7BCSZlxVnu3hUTsBHD4bigkA++bVqEjCoZqbFnPtUVnzQc8XUxEK/sK5IUub6pg1+zEIl+bExiBxR6j4cT+0NwWLgYhNDW+MARkzFSwFmZTl4ZqAcktNl1xSYf53JH31a4WGij33fo9RDjlP+ajcdy/AICh3jvSI/Zbzj2jkqJR37ClBww== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=windriver.com; dmarc=pass action=none header.from=windriver.com; dkim=pass header.d=windriver.com; arc=none Received: from IA1PR11MB7677.namprd11.prod.outlook.com (2603:10b6:208:3fd::5) by CH3PR11MB8362.namprd11.prod.outlook.com (2603:10b6:610:175::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.92.18; Thu, 11 Jun 2026 22:57:56 +0000 Received: from IA1PR11MB7677.namprd11.prod.outlook.com ([fe80::d8e5:e930:6a48:871e]) by IA1PR11MB7677.namprd11.prod.outlook.com ([fe80::d8e5:e930:6a48:871e%6]) with mapi id 15.21.0113.013; Thu, 11 Jun 2026 22:57:56 +0000 From: "Reyna, David" To: "bitbake-devel@lists.openembedded.org" Subject: [bitbake-devel] [PATCH] toaster: sync release list for Toaster, test, and Layer Index Thread-Topic: [bitbake-devel] [PATCH] toaster: sync release list for Toaster, test, and Layer Index Thread-Index: Adz59UhWicdUV+FoTkSGYBfpyaZh4w== Date: Thu, 11 Jun 2026 22:57:56 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_3ea094ce-8c76-406f-84c8-0af1663f74b7_ActionId=69d5b206-ef2e-4cae-a76e-4b25b8ea1520;MSIP_Label_3ea094ce-8c76-406f-84c8-0af1663f74b7_ContentBits=0;MSIP_Label_3ea094ce-8c76-406f-84c8-0af1663f74b7_Enabled=true;MSIP_Label_3ea094ce-8c76-406f-84c8-0af1663f74b7_Method=Standard;MSIP_Label_3ea094ce-8c76-406f-84c8-0af1663f74b7_Name=INTERNAL;MSIP_Label_3ea094ce-8c76-406f-84c8-0af1663f74b7_SetDate=2026-06-11T22:54:27Z;MSIP_Label_3ea094ce-8c76-406f-84c8-0af1663f74b7_SiteId=8ddb2873-a1ad-4a18-ae4e-4644631433be;MSIP_Label_3ea094ce-8c76-406f-84c8-0af1663f74b7_Tag=10, 3, 0, 1; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: IA1PR11MB7677:EE_|CH3PR11MB8362:EE_ x-ms-office365-filtering-correlation-id: 70e178cc-7dae-4076-361b-08dec80ce097 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0;ARA:13230040|23010399003|366016|376014|1800799024|10070799003|38070700021|3023799007|11063799006|56012099006|6133799003|18002099003; x-microsoft-antispam-message-info: 3Vall6NARwu6qWNnMJCCHF14uHClPfrsAyeRIgWWWzUjv3hgDhfAuHTLv7qfVpdoqwd26W+4c0hMbnDBsy9EbcRG1m/+Qg++iV6wSnqGCTs+QXoLNN7PRqYG0zDCYmUUgh3FDSdaVXrfVb7k+YgA1sPJN+0ZGFw/bZ3bI8KTbU7MdVwY4C9EbzD3VTw4iR0Sq8QEhSeZ7heMfhrR0kzf0cF8HC/P+6gZBhQzx8eRitKYdv7JYOgRZoYBljC6hge4CdHh6jqUbJznjHtY9xSp0j7Axk4RsorSdQl8ZqzpF5xhR+8i0/NOS3JMf3NqmRqyaySVhANrjhPYwt/5mTFLAbfiUT7Mcoq5Yn8XqrLhZPjNKw5NR4ZJZLG6hBDfFTEGGVdR6HXsgdtzjCyNPq795lD9BrZO95OQ9YK2wcm5YTuo0bdRkpScg+ClRluUDBZ4FdeDvkpeOwRgpP8dL5yCIL3HnFY6RY2mWCl0SbFqluZ31CyNHdc5g2YJyNz3F2E3T46VMI7H8HVn+SwKk9OLdZtsaZt2NT03hMTJMATk1hFZgzkEuQIYHbW6c4OQtCNBZ4HDRvwPN+U76fZ59Tzns9SPKJDmcmzfZjYrUC1qv89BEWJhKi+sA3jdSfE6Gc40yeSEf8SZ716YPRSAeaz34XRwBmJhOAIKAahhmf6A3YBdaS03hiDp498OLkBhtUqqvcGo+K3IJMfbKSCcE2hGMA== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:IA1PR11MB7677.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(23010399003)(366016)(376014)(1800799024)(10070799003)(38070700021)(3023799007)(11063799006)(56012099006)(6133799003)(18002099003);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 2 x-ms-exchange-antispam-messagedata-0: Sn1tK2SFgXEy6QksWIC/zQjt0rj32HJxUk6K7DOI/a7dPQLB2WWcbscuav94FQNEGrnJVHoOlFWqZaANhlUoBaOgx4QTAbLrlQP3vhxWnk4YJb/aYzEjidEn0WEyJIugqHNccoT1+a2ZhA0Ce7XXTi+fVnjykTwluCUJaJ8y4Yfr87otMLFyCGd4b/5EWeTOdFCsi0fxHJe+pTQYzO6ssv6uaZwx68NhWu5V30ultIvkJ1DBAc55MfTFZXFJE7o8mPO/fktrvZcqXY4OqPGsrBNdrzaxmvT+QALBZMzSX2WwsZ2TtWrEcWdSVTY/G5RZsXNX82ytXyhXHJ0s7mHwitzQef3scDd5MAdxvPzqLbmCXU8UHlqBV1KDiZ9AnTniDVW7lgVG6MIVzWZdNW9+GPBX0udtxANDs5qoI9zaoMZid/UDD+Ah+5IRfWdJIWhy1hOqk+G1K96qiAVAEuGXTyq6lHFNxPt7l6MpX+/o0U158R5X8xYZEf344qeIzVYn4xSnCF9H7eZobUgRTVwZ/f/izW4RgWpDUMcb3Ah1WUnrgYdlPu4tMfV9iwlQOkn9ROr/rJcd/XePTVRs+QDYCpHOyXTHO8k81vACm9sROIKCNIubUhacklCwlfnZmH1D7LecEy2noGQLS/ww2qyZDAKySoV3UFYzNctaDGSNmWjNZ9eMKSesuyG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4I2XwzHC6e7TN9Mp6c5pjYEy8R04VrOt9io5+ x-ms-exchange-antispam-messagedata-1: cS+tayc7rFytMA== MIME-Version: 1.0 X-Exchange-RoutingPolicyChecked: SZLbiiCGBataqkEMctkIRnwr28rP1Sw/gix3JKK7vV3vSJmYOjFQQjdmYe3gLOy+8QQvmGFfDwrfxSlOj3fBujc1OrO68vcrw20+vk5EsN73JiE0QDLql4pSYDSHs1aVB/ylfpIsrAqtD6Sl9pcKTbWGQx1K1TbLCvz/8o1TpL9gkN8CiRxJmfAObEo7lZRHsJxDWRYfYXstOeejxZ/D1Bkwwl0IndHNQp9YWjyPXCeyAE5CcAV1S9jx/NEsDtSLShsJ1lXnHQO8YZeUdhwdneO8fF1YWqts/W+R3RVZE41obF1Mhhu1nSui2TEKYMsXQlf334z7tSopyfapp9fQwA== X-OriginatorOrg: windriver.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: IA1PR11MB7677.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 70e178cc-7dae-4076-361b-08dec80ce097 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Jun 2026 22:57:56.6051 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 8ddb2873-a1ad-4a18-ae4e-4644631433be X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: hb1h0WGpuMJHKvv7HOMk9rDYzIJ9EQcARU7ABTJ+nbuCMZLdo8+tAZDn2oNcfeJSjCOsFMRig6fshNIOtIeo7yiDeTu6gn31gyQLQL6WHGk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR11MB8362 X-Proofpoint-ORIG-GUID: VO8ZbSHThFaRhTjvl6mDYPCHnxgemyFq X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjExMDIzMCBTYWx0ZWRfX5g91b0INMPD6 sFL6Prsf2//+XWm1UD6iDxcRx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6nhCDjbu/9diXMLoeMyxCmXjwXfe0tHcgFp55BOumQPRzFVr X-Proofpoint-GUID: VO8ZbSHThFaRhTjvl6mDYPCHnxgemyFq X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-11_05,2026-06-11_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 priorityscore=1501 bulkscore=0 phishscore=0 adultscore=0 lowpriorityscore=0 malwarescore=0 impostorscore=0 spamscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606110230 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 11 Jun 2026 22:58:07 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/19670 From 21858028a7448ff2d92e388f96da7127cfd7048e Mon Sep 17 00:00:00 2001 From: David Reyna mailto:David.Reyna@windriver.com Date: Thu, 11 Jun 2026 14:55:37 -0700 Subject: [PATCH] toaster: sync release list for Toaster, test, and Layer Index Details: * check_fixtures.py: ignore releases not yet in Layer Index (e.g. 'blacksail') * gen_fixtures.py: also sync 'test_create_new_project.py' * test_create_new_project.py: now a generated release list, in slot order * toaster: remove 'exit()' from this sourced script [YOCTO #16280] Signed-off-by: David Reyna mailto:David.Reyna@windriver.com --- bin/toaster | 2 +- lib/toaster/orm/fixtures/check_fixtures.py | 55 ++++++++++---- lib/toaster/orm/fixtures/gen_fixtures.py | 74 +++++++++++++++++-- .../functional/test_create_new_project.py | 49 ++++++------ 4 files changed, 133 insertions(+), 47 deletions(-) diff --git a/bin/toaster b/bin/toaster index d20cbe90b..16a64bab6 100755 --- a/bin/toaster +++ b/bin/toaster @@ -236,7 +236,7 @@ for param in $*; do manage_cmd="$manage_cmd $param" else echo "$HELP" - exit 1 + return 1 fi ;; diff --git a/lib/toaster/orm/fixtures/check_fixtures.py b/lib/toaster/orm/fixtures/check_fixtures.py index ae3722e0f..386c2da40 100755 --- a/lib/toaster/orm/fixtures/check_fixtures.py +++ b/lib/toaster/orm/fixtures/check_fixtures.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -# Copyright (C) 2025 Linux Foundation +# Copyright (C) 2026 Linux Foundation # SPDX-License-Identifier: GPL-2.0-only # @@ -10,29 +10,52 @@ import urllib.request import gen_fixtures as fixtures RELEASE_URL = https://dashboard.yoctoproject.org/releases.json +LAYER_INDEX_URL = https://layers.openembedded.org/layerindex/api/branches/ + +# Load a JSON file via REST +def fetch_json(url): + with urllib.request.urlopen(url) as response: + if response.getcode() == 200: + data = response.read().decode("utf-8") + return(json.loads(data)) + else: + print("Couldn't access %s: %s" % (url, reponse.getcode())) + exit(1) + +# Grab the existing release branches in the Layer Index +branches = fetch_json(LAYER_INDEX_URL) +index_branches = [ + e["name"].lower() for e in branches +] -with urllib.request.urlopen(RELEASE_URL) as response: - if response.getcode() == 200: - data = response.read().decode("utf-8") - releases = json.loads(data) +# Grab the recent release branches and add master, so we can ignore old branches +releases = fetch_json(RELEASE_URL) +active_releases = [] +active_but_not_index = [] +for e in releases: + if e["series"] != "current": + continue + release = e["release_codename"].lower() + if not release in index_branches: + active_but_not_index.append(release) 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(release) active_releases.append("master") active_releases.append("head") +active_releases.sort() + +if active_but_not_index: + print(f"Note: Active releases that are not yet in the Layer Index: {active_but_not_index}" ) +# Get the list of releases instantiated in the Toaster fixtures fixtures_releases = [x[0].lower() for x in fixtures.current_releases] +fixtures_releases.sort() +# Report the resulting status 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)) + print(f"WARNING: Active releases don't match toaster configured releases, the difference is: {set(active_releases).difference(set(fixtures_releases))}") + print(f"Active releases: {sorted(active_releases)}") + print(f"Toaster configured releases: {sorted(fixtures_releases)}") else: print("Success, configuration matches") diff --git a/lib/toaster/orm/fixtures/gen_fixtures.py b/lib/toaster/orm/fixtures/gen_fixtures.py index dda0b8196..937f1ff88 100755 --- a/lib/toaster/orm/fixtures/gen_fixtures.py +++ b/lib/toaster/orm/fixtures/gen_fixtures.py @@ -4,7 +4,7 @@ # # Generate Toaster Fixtures for 'poky.xml' and 'oe-core.xml' # -# Copyright (C) 2022 Wind River Systems +# Copyright (C) 2026 Wind River Systems # SPDX-License-Identifier: GPL-2.0-only # # Edit the 'current_releases' table for each new release cycle @@ -413,6 +413,68 @@ def generate_oe_core(): print_str(epilog_template,fd) fd.close() +################################# +# Update test project list +# + +def generate_test(): + this_path = os.path.dirname(os.path.abspath(__file__)) + test_script = os.path.join(this_path,"../../tests/functional/test_create_new_project.py") + + is_copy = True + out_lines = "" + with open(test_script, 'r') as file_fd: + lines = file_fd.readlines() + for line in lines: + if 'test_create_new_project_without_name' in line: + is_copy = True + out_lines += '\n' + if is_copy: + out_lines += line + if line.startswith('class TestCreateNewProject'): + is_copy = False + # Insert new project entries + + for id,release in enumerate(current_releases): + release_id = id + 1 + release_name = release[0] + release_merge = 'True' + release_version = '' + if 'Master' == release_name: + release_name = 'Master' + release_title = 'Yocto Project master' + release_merge = 'False' + elif 'HEAD' == release_name: + release_name = 'Local' + release_title = 'Local Yocto Project' + else: + release_title = f'Yocto Project {release[1]} "{release_name}"' + release_version = f'{release[1]} ' + # Insert project + test_release_def = f''' + def test_create_new_project_{release_name.lower()}(self): + """ Test create new project using: + - Project Name: Any string + - Release: Yocto Project {release_version}"{release_name}" (option value: {release_id}) + - Merge Toaster settings: {release_merge} + """ + release = '{release_id}' + release_title = '{release_title}' + project_name = 'project{release_name.lower()}' + self.create_new_project( + project_name, + release, + release_title, + {release_merge}, + ) +''' + out_lines += test_release_def + + with open('test_create_new_project.py', 'w') as file_fd: + file_fd.write(out_lines) + print(f"Output: 'test_create_new_project.py'") + os.system(f"mv -f test_create_new_project.py {test_script}") + ################################# # Help # @@ -431,8 +493,9 @@ def main(argv): global verbose parser = argparse.ArgumentParser(description='gen_fixtures.py: table generate the fixture files') - parser.add_argument('--poky', '-p', action='store_const', const='poky', dest='command', help='Generate the poky.xml file') - parser.add_argument('--oe-core', '-o', action='store_const', const='oe_core', dest='command', help='Generate the oe-core.xml file') + parser.add_argument('--poky', '-p', action='store_const', const='poky', dest='command', help="Generate the 'poky.xml' file") + parser.add_argument('--oe-core', '-o', action='store_const', const='oe_core', dest='command', help="Generate the 'oe-core.xml' file") + parser.add_argument('--test', '-t', action='store_const', const='test', dest='command', help="Update the 'test_create_new_project.py' file") parser.add_argument('--all', '-a', action='store_const', const='all', dest='command', help='Generate all fixture files') parser.add_argument('--list', '-l', action='store_const', const='list', dest='command', help='List the release table') parser.add_argument('--verbose', '-v', action='store_true', dest='verbose', help='Enable verbose debugging output') @@ -443,11 +506,12 @@ def main(argv): generate_poky() elif 'oe_core' == args.command: generate_oe_core() + elif 'test' == args.command: + generate_test() elif 'all' == args.command: generate_poky() generate_oe_core() - elif 'all' == args.command: - list_releases() + generate_test() elif 'list' == args.command: list_releases() diff --git a/lib/toaster/tests/functional/test_create_new_project.py b/lib/toaster/tests/functional/test_create_new_project.py index 6e22bdee3..f290f8b3e 100644 --- a/lib/toaster/tests/functional/test_create_new_project.py +++ b/lib/toaster/tests/functional/test_create_new_project.py @@ -15,31 +15,31 @@ from selenium.webdriver.common.by import By class TestCreateNewProject(SeleniumFunctionalTestCase): - def test_create_new_project_master(self): + def test_create_new_project_wrynose(self): """ Test create new project using: - Project Name: Any string - - Release: Yocto Project master (option value: 3) - - Merge Toaster settings: False + - Release: Yocto Project 6.0 "Wrynose" (option value: 1) + - Merge Toaster settings: True """ - release = '3' - release_title = 'Yocto Project master' - project_name = 'projectmaster' + release = '1' + release_title = 'Yocto Project 6.0 "Wrynose"' + project_name = 'projectwrynose' self.create_new_project( project_name, release, release_title, - False, + True, ) - def test_create_new_project_wrynose(self): + def test_create_new_project_local(self): """ Test create new project using: - Project Name: Any string - - Release: Yocto Project 6.0 "Wrynose" (option value: 1) + - Release: Yocto Project "Local" (option value: 2) - Merge Toaster settings: True """ - release = '1' - release_title = 'Yocto Project 6.0 "Wrynose"' - project_name = 'projectwrynose' + release = '2' + release_title = 'Local Yocto Project' + project_name = 'projectlocal' self.create_new_project( project_name, release, @@ -47,32 +47,31 @@ class TestCreateNewProject(SeleniumFunctionalTestCase): True, ) - - def test_create_new_project_scarthgap(self): + def test_create_new_project_master(self): """ Test create new project using: - Project Name: Any string - - Release: Yocto Project 5.0 "Scarthgap" (option value: 4) - - Merge Toaster settings: True + - Release: Yocto Project "Master" (option value: 3) + - Merge Toaster settings: False """ - release = '4' - release_title = 'Yocto Project 5.0 "Scarthgap"' - project_name = 'projectscarthgap' + release = '3' + release_title = 'Yocto Project master' + project_name = 'projectmaster' self.create_new_project( project_name, release, release_title, - True, + False, ) - def test_create_new_project_local(self): + def test_create_new_project_scarthgap(self): """ Test create new project using: - Project Name: Any string - - Release: Local Yocto Project (option value: 2) + - Release: Yocto Project 5.0 "Scarthgap" (option value: 4) - Merge Toaster settings: True """ - release = '2' - release_title = 'Local Yocto Project' - project_name = 'projectlocal' + release = '4' + release_title = 'Yocto Project 5.0 "Scarthgap"' + project_name = 'projectscarthgap' self.create_new_project( project_name, release,