From patchwork Tue Oct 17 21:58:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alassane Yattara X-Patchwork-Id: 32496 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 27948CDB474 for ; Tue, 17 Oct 2023 21:59:12 +0000 (UTC) Received: from mail.savoirfairelinux.com (mail.savoirfairelinux.com [208.88.110.44]) by mx.groups.io with SMTP id smtpd.web11.268581.1697579944061959769 for ; Tue, 17 Oct 2023 14:59:04 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@savoirfairelinux.com header.s=DFC430D2-D198-11EC-948E-34200CB392D2 header.b=e/zohqSC; spf=pass (domain: savoirfairelinux.com, ip: 208.88.110.44, mailfrom: alassane.yattara@savoirfairelinux.com) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 309579C2AEF for ; Tue, 17 Oct 2023 17:59:03 -0400 (EDT) Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavis, port 10032) with ESMTP id Z09vfA7ngaOU; Tue, 17 Oct 2023 17:59:02 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 9D2F89C2C9C; Tue, 17 Oct 2023 17:59:02 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.savoirfairelinux.com 9D2F89C2C9C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=savoirfairelinux.com; s=DFC430D2-D198-11EC-948E-34200CB392D2; t=1697579942; bh=X2mswYSson0xhQeuSDPkGh5W5mVct11mmqCDDN0gJK4=; h=From:To:Date:Message-Id:MIME-Version; b=e/zohqSCF7lDL3hz0q+P/CirHQ4Z9fTI/Vjxslc77FYNe6/1L2g/t7lhFcafE1Lgn PV1p36nuaaaZVaSJJ9yTrTICCxJBJelccpwDVVQIXfIQGCZYAHce79YJUskWoKnphf zLylDDU5jeLV0LeOxiFMuzIpuuSvjjcMkKfvOnOv9rJcevMiH7MPdqrHyIgRzS095L Z/E3rU3xXcibkw90gLYuSt3CSOUOE2GfcE0wR4xWvY4qGP09DKOyoTxVm8uGVVB6AR BuirI6md1eCYpU54cK2HUhd/tNUJjOOX57Qi5jtQut8z6/LDaQBEpzvtSomYcHu3/Y DF1XhjnOIedzA== X-Virus-Scanned: amavis at mail.savoirfairelinux.com Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavis, port 10026) with ESMTP id ADTc8r_0mdXI; Tue, 17 Oct 2023 17:59:02 -0400 (EDT) Received: from jedi.. (unknown [196.117.75.249]) by mail.savoirfairelinux.com (Postfix) with ESMTPSA id EDBE09C2AEF; Tue, 17 Oct 2023 17:59:01 -0400 (EDT) From: Alassane Yattara To: bitbake-devel@lists.openembedded.org Cc: Alassane Yattara Subject: [PATCH 1/2] Toaster: bug-fix on tests/views/test_views.py Date: Tue, 17 Oct 2023 22:58:47 +0100 Message-Id: <20231017215848.514246-1-alassane.yattara@savoirfairelinux.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 17 Oct 2023 21:59:12 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/15256 - Create a tmp file for base recipe, otherwise test fail it doesn't exist Signed-off-by: Alassane Yattara --- lib/toaster/tests/views/test_views.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/toaster/tests/views/test_views.py b/lib/toaster/tests/views/test_views.py index f962e762..06bf6c20 100644 --- a/lib/toaster/tests/views/test_views.py +++ b/lib/toaster/tests/views/test_views.py @@ -41,7 +41,15 @@ class ViewTests(TestCase): def setUp(self): self.project = Project.objects.first() + self.recipe1 = Recipe.objects.get(pk=2) + # create a file and to recipe1 file_path + file_path = f"/tmp/{self.recipe1.name.strip().replace(' ', '-')}.bb" + with open(file_path, 'w') as f: + f.write('foo') + self.recipe1.file_path = file_path + self.recipe1.save() + self.customr = CustomImageRecipe.objects.first() self.cust_package = CustomImagePackage.objects.first() self.package = Package.objects.first() From patchwork Tue Oct 17 21:58:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alassane Yattara X-Patchwork-Id: 32495 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 2866DC41513 for ; Tue, 17 Oct 2023 21:59:12 +0000 (UTC) Received: from mail.savoirfairelinux.com (mail.savoirfairelinux.com [208.88.110.44]) by mx.groups.io with SMTP id smtpd.web10.268963.1697579947218112129 for ; Tue, 17 Oct 2023 14:59:07 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@savoirfairelinux.com header.s=DFC430D2-D198-11EC-948E-34200CB392D2 header.b=HGtsNWBU; spf=pass (domain: savoirfairelinux.com, ip: 208.88.110.44, mailfrom: alassane.yattara@savoirfairelinux.com) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id E57129C3226 for ; Tue, 17 Oct 2023 17:59:05 -0400 (EDT) Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavis, port 10032) with ESMTP id jhvGo3nRUQg7; Tue, 17 Oct 2023 17:59:05 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 449289C2C9C; Tue, 17 Oct 2023 17:59:05 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.savoirfairelinux.com 449289C2C9C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=savoirfairelinux.com; s=DFC430D2-D198-11EC-948E-34200CB392D2; t=1697579945; bh=eKiSBrTuzEPt7GUbyMGUvWmEhbTDPkZY4Yh5GNnkhTU=; h=From:To:Date:Message-Id:MIME-Version; b=HGtsNWBUcV7uYHyA/Ev5A+3nKs/jiqzs7+6NazrrQMZjPe+rxzakCK3wG9VxE40fv +yyvGX6Ksc5C4eEf+DEHNoVR5Cnc72nAqoWyDRWiEnJhKDrmv6Oty442N5eqQZ+uA0 Qbd1p0u6guZo6ISWypWqK/KG2Lrz6UszybXKWj2gZgWMZczrQ4YrIKj6wkM9bQfye+ RAgZZYagY02Qx8AUQCL9Gqw0h3wjH53Xp1b8D4cfpurb3RO7sSbmLN7uzX3qZ7AC4r sUwnsozHKjTphBfEJXJIjNUudTx9y2eoBcEBttQ9lJKqThy93uf8NXHfssXulRO7+8 IT7MXoMBq7Djw== X-Virus-Scanned: amavis at mail.savoirfairelinux.com Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavis, port 10026) with ESMTP id oOYEQqo2rlTU; Tue, 17 Oct 2023 17:59:05 -0400 (EDT) Received: from jedi.. (unknown [196.117.75.249]) by mail.savoirfairelinux.com (Postfix) with ESMTPSA id 64D119C2AEF; Tue, 17 Oct 2023 17:59:04 -0400 (EDT) From: Alassane Yattara To: bitbake-devel@lists.openembedded.org Cc: Alassane Yattara Subject: [PATCH 2/2] Toaster: bug-fix on tests.views.test_views.py Date: Tue, 17 Oct 2023 22:58:48 +0100 Message-Id: <20231017215848.514246-2-alassane.yattara@savoirfairelinux.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231017215848.514246-1-alassane.yattara@savoirfairelinux.com> References: <20231017215848.514246-1-alassane.yattara@savoirfairelinux.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 17 Oct 2023 21:59:12 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/15257 - Update toastergui/fixtures/toastergui-unittest-data.xml to added tow distro objects. Test fail because distro table was empty Signed-off-by: Alassane Yattara --- .../toastergui/fixtures/toastergui-unittest-data.xml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/toaster/toastergui/fixtures/toastergui-unittest-data.xml b/lib/toaster/toastergui/fixtures/toastergui-unittest-data.xml index 4517ed17..1d522f88 100644 --- a/lib/toaster/toastergui/fixtures/toastergui-unittest-data.xml +++ b/lib/toaster/toastergui/fixtures/toastergui-unittest-data.xml @@ -6,6 +6,18 @@ b a + + + 1 + poky_distro1 + poky_distro1 description + + + + 2 + poky_distro2 + poky_distro2 description + master master project