From patchwork Tue Oct 17 20:49:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alassane Yattara X-Patchwork-Id: 32488 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 A6CF1CDB474 for ; Tue, 17 Oct 2023 20:49:41 +0000 (UTC) Received: from mail.savoirfairelinux.com (mail.savoirfairelinux.com [208.88.110.44]) by mx.groups.io with SMTP id smtpd.web11.266972.1697575778613606068 for ; Tue, 17 Oct 2023 13:49:38 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@savoirfairelinux.com header.s=DFC430D2-D198-11EC-948E-34200CB392D2 header.b=AvMsCRuh; 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 C58FB9C0B97 for ; Tue, 17 Oct 2023 16:49:37 -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 anhIrfF8N96d; Tue, 17 Oct 2023 16:49:37 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 2B7F59C0D5B; Tue, 17 Oct 2023 16:49:37 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.savoirfairelinux.com 2B7F59C0D5B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=savoirfairelinux.com; s=DFC430D2-D198-11EC-948E-34200CB392D2; t=1697575777; bh=Fu4CT9GIRotRtktuqL9zBMZu7Bw1zsC2X+xgsVDHyhc=; h=From:To:Date:Message-Id:MIME-Version; b=AvMsCRuhO9mVtyyBi3epZW9S7uu5E/wkay8PEbnQx9aEbB2Zy5kk38Yqdqwga2gey 11iW3uJfA1CbMef/pa3muM3DIANvtMnuLXS1gybG1uvVQtX/rTE0FcXJrhuHjS+P68 Jp1sAaRRnb1ivLAg5ZTF7gUXorGvdy2av9/pXAK2DIGdgPArG280GJKsRKTELh36q6 UIRXpr5IPepBzONHKGLPQcto4izsLvQes/pzXt5DKQZIwS/8Csh8ak5Dkc4kBuwQi6 8Hz41C946sE3GSKGUq8CF+jPUpYmL63Xgfc6DYtfvavR+QQoIPJW4V7WaWBC7MqpaK c8TnMHCNjbmZg== 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 P3kKaDGaWI5a; Tue, 17 Oct 2023 16:49:37 -0400 (EDT) Received: from jedi.. (unknown [196.117.75.249]) by mail.savoirfairelinux.com (Postfix) with ESMTPSA id 4936A9C0B97; Tue, 17 Oct 2023 16:49:36 -0400 (EDT) From: Alassane Yattara To: toaster@lists.yoctoproject.org Cc: Alassane Yattara Subject: [PATCH] Toaster: bug-fix on custom image test cases Date: Tue, 17 Oct 2023 21:49:30 +0100 Message-Id: <20231017204930.411529-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 20:49:41 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/toaster/message/5869 To test custom image creation, a file for base_recipe should exists otherwise test fail, User we need to build a base image first, that will create a file for base_recipe, which take a while. To avoid test dependencies between test and run build, i create a tmp file for base recipe. Signed-off-by Alassane Yattara --- lib/toaster/tests/browser/test_new_custom_image_page.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/toaster/tests/browser/test_new_custom_image_page.py b/lib/toaster/tests/browser/test_new_custom_image_page.py index 6361f403..34d1bd45 100644 --- a/lib/toaster/tests/browser/test_new_custom_image_page.py +++ b/lib/toaster/tests/browser/test_new_custom_image_page.py @@ -48,8 +48,12 @@ class TestNewCustomImagePage(SeleniumTestCase): self.recipe = Recipe.objects.create( name='core-image-minimal', layer_version=layer_version, + file_path='/tmp/core-image-minimal.bb', is_image=True ) + # create a tmp file for the recipe + with open(self.recipe.file_path, 'w') as f: + f.write('foo') # another project with a custom image already in it project2 = Project.objects.create(name='whoop', release=release)